mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-11-30 18:07:53 +01:00
cherry pick from previously broken and abandoned branch
colorize buttons and ratio bar Resolves #218 Using user options (#387) edit color schemes logistics for the added options handles storage, change, initialize
This commit is contained in:
1 parent
510c083c77
commit
b476c60fe0
7 files changed
+210
-8
No files matched your search
@@ -13,6 +13,9 @@ const DISLIKES_DISABLED_TEXT = "DISLIKES DISABLED";
|
||||
|
||||
let extConfig = {
|
||||
disableVoteSubmission: false,
|
||||
coloredThumbs: false,
|
||||
coloredBar: false,
|
||||
colorTheme: "classic",
|
||||
};
|
||||
|
||||
let storedData = {
|
||||
@@ -98,6 +101,9 @@ function processResponse(response, storedData) {
|
||||
storedData.dislikes = parseInt(response.dislikes);
|
||||
storedData.likes = getLikeCountFromButton() || parseInt(response.likes);
|
||||
createRateBar(storedData.likes, storedData.dislikes);
|
||||
if (extConfig.coloredThumbs === true) {
|
||||
// TODO: colorize thumbs
|
||||
}
|
||||
}
|
||||
|
||||
async function setState(storedData) {
|
||||
@@ -142,6 +148,9 @@ function setInitialState() {
|
||||
|
||||
function initExtConfig() {
|
||||
initializeDisableVoteSubmission();
|
||||
initializeColoredThumbs();
|
||||
initializeColoredBar();
|
||||
initializeColorTheme();
|
||||
}
|
||||
|
||||
function initializeDisableVoteSubmission() {
|
||||
|
||||
Reference in new issue
Block a user