mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-11-30 01:47:54 +01:00
Prettier applied to whole project, prettier added to pre-commit hook
This commit is contained in:
1 parent
47517ce0bd
commit
b133adeecb
59 files changed
+912
-819
No files matched your search
@@ -1,5 +1,16 @@
|
||||
import { getBrowser, getVideoId, numberFormat, cLog, createObserver } from "./utils";
|
||||
import { checkForSignInButton, getButtons, getDislikeButton, getLikeButton } from './buttons';
|
||||
import {
|
||||
getBrowser,
|
||||
getVideoId,
|
||||
numberFormat,
|
||||
cLog,
|
||||
createObserver,
|
||||
} from "./utils";
|
||||
import {
|
||||
checkForSignInButton,
|
||||
getButtons,
|
||||
getDislikeButton,
|
||||
getLikeButton,
|
||||
} from "./buttons";
|
||||
import {
|
||||
NEUTRAL_STATE,
|
||||
LIKED_STATE,
|
||||
@@ -101,15 +112,21 @@ let smartimationObserver = null;
|
||||
|
||||
function createSmartimationObserver() {
|
||||
if (!smartimationObserver) {
|
||||
smartimationObserver = createObserver({
|
||||
attributes: true,
|
||||
subtree: true
|
||||
}, updateDOMDislikes);
|
||||
smartimationObserver = createObserver(
|
||||
{
|
||||
attributes: true,
|
||||
subtree: true,
|
||||
},
|
||||
updateDOMDislikes,
|
||||
);
|
||||
smartimationObserver.container = null;
|
||||
}
|
||||
|
||||
const smartimationContainer = getButtons().querySelector('yt-smartimation');
|
||||
if (smartimationContainer && smartimationObserver.container != smartimationContainer) {
|
||||
const smartimationContainer = getButtons().querySelector("yt-smartimation");
|
||||
if (
|
||||
smartimationContainer &&
|
||||
smartimationObserver.container != smartimationContainer
|
||||
) {
|
||||
cLog("Initializing smartimation mutation observer");
|
||||
smartimationObserver.disconnect();
|
||||
smartimationObserver.observe(smartimationContainer);
|
||||
@@ -120,7 +137,7 @@ function createSmartimationObserver() {
|
||||
function storageChangeHandler(changes, area) {
|
||||
if (changes.disableVoteSubmission !== undefined) {
|
||||
handleDisableVoteSubmissionChangeEvent(
|
||||
changes.disableVoteSubmission.newValue
|
||||
changes.disableVoteSubmission.newValue,
|
||||
);
|
||||
}
|
||||
if (changes.coloredThumbs !== undefined) {
|
||||
@@ -137,7 +154,7 @@ function storageChangeHandler(changes, area) {
|
||||
}
|
||||
if (changes.numberDisplayReformatLikes !== undefined) {
|
||||
handleNumberDisplayReformatLikesChangeEvent(
|
||||
changes.numberDisplayReformatLikes.newValue
|
||||
changes.numberDisplayReformatLikes.newValue,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user