* 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>
* 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
* Extension - new (spring 2024) UI support
Add new player selector for isVideoLoaded() (fixes#1043)
* Githook tasks for fd45f86f (in a separate commit for readability)
* 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
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.
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
colorize buttons and ratio bar
Resolves#218
Using user options (#387)
edit color schemes
logistics for the added options
handles storage, change, initialize