Commit Graph
27 Commits
Author SHA1 Message Date
Leon BubovaandDmitrii Selivanov d62130b898 Feature/add unit testing framework and start writing unit tests (acceptance tests) (#708)
* add jest and rewire for testing

* wrap loose code for initMutationObserver() in function and call it instead of just executing it

Otherwise this code is executed everytime state.js is imported somewhere in a file.
This leads to not being able to test properly, since state.js is imported in a lot
of the src files and fails when running the tests since we are missing global environment
settings such as document, window etc in the jest environment.

* export roundDown and getNumberformatter to make them testable as well

* add basic acceptance tests for utils.js, create snapshots and add jest config

* add failing test for buggy behaviour in a separate test case and skip it until fixed

* Fixes after merge conflicts

---------

Co-authored-by: Dmitrii Selivanov <selivano.d@gmail.com>
2024-06-16 19:52:58 +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
Enguerran P 1ed03f7cc9 Extension - New (spring 2024) UI support (#1045)
* Extension - new (spring 2024) UI support

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

* Githook tasks for fd45f86f (in a separate commit for readability)
2024-04-18 13:06:57 +02:00
Anarios b133adeecb Prettier applied to whole project, prettier added to pre-commit hook 2024-01-15 01:39:46 +01:00
Moondarker 6791543617 Extension fix - disappearing dislike counter (#999)
* Fix rate bar jumping around in width

* Fix disappearing dislike counter

* Fix disappearing dislike count on button focus/unfocus by @kokonguyen191

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

* Extension fix for disappearing dislikes while smartimations play

* Check if smartimationContainer exists
2023-12-12 19:33:37 +01:00
Anarios b6367ae334 3.0.0.13 release - dynamic selectors config loading from server added. 2023-12-04 11:04:14 +01: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
Anarios 8e376f6142 RoundDown option removed 2022-07-28 22:18:42 +02:00
Anarios b0cb173830 Fixes after merges, prettier globally applied 2022-07-26 00:05:20 +02: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
Dmitrii Selivanov 0df5bb75e7 3.0.0.1 2022-04-27 00:56:05 +02:00
Cyril Strahm 1d2f89a38c Display 'temporarily unavailable' when the API can't be reached 2022-04-06 21:50:39 +02:00
Tobias Speicher 73448d2bd1 Replace deprecated String.prototype.substr()
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-03-25 15:41:48 +01:00
Dmitrii Selivanov 00f03095c6 Some more merge issues fixed, fixed webpack watch 2022-03-21 00:00:50 +03:00
Dmitrii Selivanov b7029ce426 Merge issues fixed, core reformatted with prettier 2022-03-20 23:40:46 +03:00
Dmitrii Selivanov f218443b4c Merge branch 'main' into ColorizedButtonsAndBar-New 2022-03-20 23:24:08 +03:00
Dmitrii Selivanov e97b4a75af Merge branch 'main' into CustomNumberFormat 2022-03-20 20:32:21 +03:00
RyanBurgert219 1cc579d00d Extensions: Supports YouTube Shorts 2022-03-20 05:54:20 -04:00
Yvon Cui 54e9267655 finish implementation 2022-01-19 00:40:06 -05:00
Yvon Cui b476c60fe0 cherry pick from previously broken and abandoned branch
colorize buttons and ratio bar

Resolves #218
Using user options (#387)

edit color schemes

logistics for the added options

handles storage, change, initialize
2022-01-18 09:54:17 -05:00
Yvon Cui a2bc4ca92e Add custom number formats
Fix Issues #201 #364 #407
Using plugin options (Issue #387)
2022-01-18 09:43:46 -05:00
Leon Bubova e6a1716e7e move isVideoLoaded to utils.js 2021-12-18 00:48:44 +01:00
Leon Bubova 689b0b7f8c add setState, processResponse to state.js, getVideoId to utils.js 2021-12-18 00:41:12 +01:00
Leon Bubova 81dbd52e21 move cLog to utils.js 2021-12-18 00:10:50 +01:00
Leon Bubova 954967e701 move getBrowser to utils.js 2021-12-18 00:07:15 +01:00
Leon Bubova 3bc47f9e56 move roundDown and numberFormat utils.js and import at origin 2021-12-17 23:48:29 +01:00