Prettier applied to whole project, prettier added to pre-commit hook

This commit is contained in:
Anarios committed 2024-01-15 01:39:46 +01:00
1 parent 47517ce0bd
commit b133adeecb
59 files changed
+912 -819

No files matched your search

+27 -10
View File
@@ -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,
);
}
}