mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-12-01 10:21:22 +01:00
Reformated code in src
This commit is contained in:
1 parent
03da33736d
commit
6db73d26ba
4 files changed
+47
-39
No files matched your search
@@ -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,
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user