Reformated code in src

This commit is contained in:
thesusian committed 2022-01-08 18:36:54 +03:00
1 parent 03da33736d
commit 6db73d26ba
4 files changed
+47 -39

No files matched your search

+21 -11
View File
@@ -1,7 +1,15 @@
import { getBrowser, getVideoId, numberFormat, cLog } from "./utils"
import { checkForSignInButton, getButtons } from "./buttons"
import { NEUTRAL_STATE, LIKED_STATE, DISLIKED_STATE, setDislikes, extConfig, storedData, setLikes } from "./state"
import { createRateBar } from "./bar"
import { getBrowser, getVideoId, numberFormat, cLog } from "./utils";
import { checkForSignInButton, getButtons } from "./buttons";
import {
NEUTRAL_STATE,
LIKED_STATE,
DISLIKED_STATE,
setDislikes,
extConfig,
storedData,
setLikes,
} from "./state";
import { createRateBar } from "./bar";
function sendVote(vote) {
if (extConfig.disableVoteSubmission !== true) {
@@ -89,16 +97,18 @@ function dislikeClicked() {
function addLikeDislikeEventListener() {
const buttons = getButtons();
if (!window.returnDislikeButtonlistenersSet) {
buttons.children[0].addEventListener("click", likeClicked);
buttons.children[1].addEventListener("click", dislikeClicked);
window.returnDislikeButtonlistenersSet = true;
}
if (!window.returnDislikeButtonlistenersSet) {
buttons.children[0].addEventListener("click", likeClicked);
buttons.children[1].addEventListener("click", dislikeClicked);
window.returnDislikeButtonlistenersSet = true;
}
}
function storageChangeHandler(changes, area) {
if (changes.disableVoteSubmission !== undefined) {
handleDisableVoteSubmissionChangeEvent(changes.disableVoteSubmission.newValue);
handleDisableVoteSubmissionChangeEvent(
changes.disableVoteSubmission.newValue
);
}
}
@@ -113,4 +123,4 @@ export {
dislikeClicked,
addLikeDislikeEventListener,
storageChangeHandler,
};
};