Commit Graph

146 Commits

Author SHA1 Message Date
Anarios 65d96ebe2d Match native dislike text layout in userscript (#1291) 2026-10-18 15:57:52 +02:00
Anarios a466ef3616 Merge upstream main for the 4.1.0 release 2026-10-18 14:27:40 +02:00
Anarios 4167b4d6af Prepare 4.1.0 release fixes and complete translations 2026-10-18 14:00:22 +02:00
Anarios 5c3a96d385 Add Hibiscus and custom color themes (#552) 2026-10-18 11:42:04 +02:00
Anarios c7caf4623e Merge upstream main 2026-10-17 23:13:39 +02:00
Anarios 5d69d01d67 Add comments, reactions, and notification popup 2026-10-17 21:42:01 +02:00
Yaldar fe057b3aa9 Fix ratio-bar sizing for inline YouTube controls (#1292)
Use rendered widths when inline reaction wrappers report non-numeric computed widths or zero client widths. Preserve existing block-control measurements in the extension and userscript, with generated-artifact browser regression coverage.
2026-10-17 21:10:52 +02:00
Dmitrii Selivanov f6258ddf08 Merge main and port remaining userscript null guards (#1307) 2026-10-17 20:52:50 +02:00
Dmitrii Selivanov ed021c95bf Fix userscript ratio bar fallback (#1320) 2026-10-17 20:38:20 +02:00
Anarios ee20c7437c Fix Firefox account consent for 4.0.6 2026-09-07 19:10:02 +02:00
Anarios e500088e65 Prepare 4.0.5 Firefox update and Shorts fixes
Add Firefox data consent, repair contributor sign-in, and introduce optional Hide clutter buttons. Harden video navigation, voting, and action layouts with shared browser regression coverage and reproducible release packaging.
2026-09-06 12:51:12 +02:00
Anarios 3657de9b2c Fix Shorts support and add userscript voting
Harden Shorts controls, reaction state, and navigation; share voting logic
with the extension; improve ratio-bar rendering; and add comprehensive Jest,
Playwright, artifact, and live-browser regression coverage.
2026-09-01 23:41:28 +02:00
SHIARJEOLATIVERNSTOVATERAPTICKBARYPINEU cb5915a3d4 Update Return Youtube Dislike.user.js (Might not be the best fix)
Here's a description you could use for a commit message, PR, or changelog entry:

Harden button-lookup functions against missing/changed DOM elements

getButtons(), getLikeButton(), and getDislikeButton() previously assumed YouTube's like/dislike DOM structure was always present and would throw a TypeError (e.g. "Cannot read properties of null/undefined") whenever the expected elements weren't found — for example during early page load, mid-navigation, or after a YouTube layout change breaks a selector.

Changes:

getLikeButton() / getDislikeButton() now cache a single getButtons() result per call instead of invoking it multiple times within the same expression, avoiding inconsistent reads if the DOM mutates between calls, and return null early if getButtons() itself returns nothing.
Audited all direct callers of these three functions and added ?. / early-return guards where a null return wasn't already handled: isVideoLiked, isVideoNotLiked, getLikeTextContainer, setLikes on the like side; mobile isVideoDisliked, and getDislikeTextContainer's fallback branch on the dislike side (both previously used ?. on the outer button but still dereferenced a possibly-null nested querySelector("button") result unguarded).
Fixed getDislikeTextContainer short-circuiting to undefined instead of null when dislikeButton is missing, which meant its result === null fallback check never triggered and it could try appending to a null button.
Fixed setDislikes checking _container?.innerText !== dislikesCount (safe) but then assigning _container.innerText = ... unguarded in the branch body, which still threw when _container was null.

No behavior change when the expected elements are present — this only prevents uncaught exceptions when they're not, letting the existing polling loop (checkForJS_Finish, 111ms interval) retry on the next tick instead of the script erroring out.
2026-08-19 16:36:18 -07:00
Snow 30213b9ecf Unobserved child node removals (#1096)
* fix(userscript): listen to node removals

* fix(combined): observe node removals
2024-10-16 01:27:27 +02:00
Divyansh Agrawal fbf00e474d Added Option to Disable Logging By Default (#474)
* Added Option to Disable Logging By Default

* Added Userscript Support to Disable Logging

* Formatting and Fixed Compiling

* Updated Description of Setting Option

* Whitespace 😅

* Dot in Description of Setting option

* Typo in JAVASCRIPT
2024-06-16 18:52:41 +02:00
ThomasTech bf98563c17 fix: getVideoId() with clip (#1055) 2024-06-16 14:24:21 +02:00
Anarios f1a2cd54c2 Userscript version bump 2024-04-18 13:14:21 +02:00
Enguerran P 63a8b2868b Userscript - New (spring 2024) UI support (#1046)
* Userscript - new (spring 2024) UI support

Add new player selector for isVideoLoaded() (fixes #1043)

* Githook tasks for 17f5bdf0 (in a separate commit for readability)
2024-04-18 09:12:44 +02:00
Anarios b133adeecb Prettier applied to whole project, prettier added to pre-commit hook 2024-01-15 01:39:46 +01:00
Moondarker 2f2153ed37 Userscript fix - disappearing dislike counter (#1000)
* Fix disappearing dislike counter - userscript

* Fix rate bar in userscript, disable it by default (it has been broken for ages)

* Fix event listeners being thrown away by YouTube in some cases

* Fix disappearing dislike count on button focus/unfocus

* Remove repetitive code from the userscript

* Userscript fix for disappearing dislikes while smartimations play

* Check if smartimationContainer exists

* Properly handle non-existing dislike button

In some cases, dislike button doesn't exist when we're trying to
interact with it. For end users, it manifested as dislike counter
appearing on both dislike button and share button (because
getDislikeButton was falling back to the second child of getButtons()).
I don't see an elegant way of fixing this without creating a fake button
in DOM specifically for this case or rewriting the whole userscript.
Ignoring this would result in errors appearing in console.

---------

Co-authored-by: Felix Nguyen <kokonguyen191@gmail.com>
2023-12-12 19:30:17 +01:00
Moondarker c4961aeb4b Userscript fix for the latest YouTube update (#992) 2023-12-01 10:49:55 +01:00
Anarios 5c73825aad New YouTube UI fix for userscript and extension 2023-05-10 10:47:27 +02:00
Mohit Arora 6d441a2932 Dislike text disabled on click fix. (#828)
The dislike number text got disabled whenever we clicked on the dislike button, it was because the addEventListener wasn't being attached to the correct like and dislike buttons (new).

Tested in chrome windows 11, version: 107.0.5304.107
2023-02-18 17:38:01 +01:00
1nterp 75a4fd51d6 Increase text left margin (#827) 2023-02-18 14:09:07 +01:00
Dmitrii Selivanov d12539d3bb Merge pull request #749 from hyperstown/main
Add support for new youtube layout in UserScript
2022-11-18 21:24:50 +01:00
hyperstown 87e922d41f fix like reformat option to work with new design 2022-10-18 00:39:21 +02:00
hyperstown 69d4a68656 Merge branch 'Anarios:main' into main 2022-10-01 00:09:13 +02:00
Dmitrii Selivanov de1831f2c7 Merge pull request #759 from hyperstown/fix-hidden-count
QFIX hidden dislike count, extension & userjs
2022-09-21 12:50:10 +02:00
hyperstown 8c95d76d03 fix hidden dislike count, extension & userjs 2022-09-18 12:32:44 +02:00
Thiago Ferreira 11df4d1706 HOTFIX: added aditional check for like/dislike buttons inside ACTIVE Viewport
In certain cases (see issue #741), the like/dislike buttons would be considered IN the viewport, despite its parent elements being hidden and its DOMRect being 0 on all sides. This way, added an additional check for considering these "hidden" buttons as NOT in the Viewport.
2022-09-14 11:53:13 -03:00
hyperstown af4c0a16b4 fix wrong dislike button select 2022-09-10 19:20:30 +02:00
hyperstown 59e3dc98ee fix shorts number 2022-09-10 16:16:25 +02:00
hyperstown 06261eda37 fix dislike width 2022-09-10 15:27:33 +02:00
hyperstown 6a2806cbbe add support for new yt layout on mobile 2022-09-10 14:45:40 +02:00
hyperstown da184d75ff add support for new yt layout 2022-09-10 13:47:46 +02:00
Anarios 4e0f633a14 Prettier reformat 2022-08-02 00:03:03 +02:00
sh4dow 596c0d730c fix dislike text box not being found for some users 2022-08-01 21:49:35 +02:00
Anarios b0cb173830 Fixes after merges, prettier globally applied 2022-07-26 00:05:20 +02:00
Dmitrii Selivanov 332ae78095 Merge pull request #615 from SheepStar02/main
Small change
2022-07-20 00:09:40 +02:00
Dmitrii Selivanov f4e5591f66 Merge pull request #594 from cyrildtm/fixLikeUpdated
Fix like numbers re-format
2022-07-20 00:06:45 +02:00
Dmitrii Selivanov fe64c63f91 Merge pull request #593 from cyrildtm/fixUserLocalesUndefined
Restructure userLocales logic
2022-07-20 00:04:45 +02:00
sheepstar02 407d888fc5 tiny changes 2022-05-16 23:22:27 -04:00
Aneimytis 013bb5d37d (userscript) additional like number fixes
synchronize with extension
2022-05-08 05:55:44 -05:00
Aneimytis 260798d1a8 Update like number when like/dislike button is clicked
When like button is clicked, YT will update like count. This conflicts with user option "re-format like numbers". Force update like number.

attn #561 #584
2022-05-08 05:41:30 -05:00
Aneimytis 2cd383dd12 restructure userLocales logic
re-structure number formatter functions.
Use userLocales more properly, so it's never undefined.
2022-05-08 05:00:24 -05:00
Eryk Darnowski 94cc5734cb Merge branch 'Anarios:main' into main 2022-05-03 14:08:15 +02:00
hyperstown 4de91a51ce fix userLocales is undefined 2022-04-27 18:57:17 +02:00
Dmitrii Selivanov aa4b4b4c3d Update Return Youtube Dislike.user.js 2022-04-26 20:33:19 +02:00
Eryk Darnowski 49d62522b6 Feat #211 fix whitespace 2022-04-26 20:08:19 +02:00
Eryk Darnowski f34ee8eda3 Merge branch 'main' into main 2022-04-26 19:57:20 +02:00