From 72da262759993931937dbbeaa39f74cc628becdf Mon Sep 17 00:00:00 2001 From: liyunze <50455574+liyunze-coding@users.noreply.github.com> Date: Sat, 25 May 2024 19:02:08 +0800 Subject: [PATCH] version 2.0 --- configs.js | 250 ++++----- get_token.txt | 5 - index.html | 54 +- scripts/defaultConfigs.js | 110 ++++ scripts/index.js | 4 - scripts/taskList.js | 1075 ++++++++----------------------------- 6 files changed, 453 insertions(+), 1045 deletions(-) delete mode 100644 get_token.txt create mode 100644 scripts/defaultConfigs.js diff --git a/configs.js b/configs.js index aca32e2..752e216 100644 --- a/configs.js +++ b/configs.js @@ -1,165 +1,105 @@ const configs = (function () { "use strict"; - // settings - const enableLimit = false; // true or false - const limit = 10; // integer - - const modifyLocalStorage = false; // true or false - const showOnlyStreamerTasks = false; // true or false - - // animation - const scrollSpeed = 40; // milliseconds - const gapBetweenScrolls = 0; // px - - // STYLES - // task list - const taskListBackgroundColor = "#000000"; // hex only - const taskListBackgroundOpacity = 0; // 0.0 - 1.0 - - const taskListBorderWidth = "0px"; // px - const taskListBorderColor = "#ffffff"; // hex or name - const taskListBorderRadius = "0px"; // px - - const taskListHorizontalPadding = "0px"; // px - const taskListVerticalPadding = "0px"; // px - - // header - const headerHorizontalPadding = "10px"; // px - const headerVerticalPadding = "10px"; // px - - const headerBackgroundColor = "#fff"; // hex only - const headerBackgroundOpacity = 1; // 0.0 - 1.0 - - const headerBorderWidth = "0px"; // px - const headerBorderColor = "#ffffff"; // hex or name - const headerBorderRadius = "3px"; // px - - const headerFontFamily = "Fredoka"; // font name - const headerGoogleFont = true; // true: use google font, false: use system font - - const headerFontSize = "25px"; // px - const headerFontWeight = "bold"; // normal or bold or number - - const headerFontColor = "#000"; // hex or name - - // body - const bodyBackgroundColor = "#fff"; // hex only - const bodyBackgroundOpacity = 0; // 0.0 - 1.0 - - const bodyBorderWidth = "0px"; // px - const bodyBorderColor = "#fff"; // hex or name - const bodyBorderRadius = "5px"; // px - - // task - const lineHeight = 1.5; // number - const usernameFontWeight = "bold"; // normal or bold or number - const usernameColor = "pink"; // hex or name or "" for twitch user color - const usernameFontSize = "20px"; // px - - const taskWidth = "100%"; - - const taskBackgroundColor = "#fff"; // hex only - const taskBackgroundOpacity = 0; // 0.0 - 1.0 - - const taskFontFamily = "Poppins"; // font name - const taskGoogleFont = true; // true: use google font, false: use system font - - const taskFontSize = "20px"; // px - const taskFontColor = "#fff"; // hex or name - - const taskBorderColor = "#fff"; // hex or name - const taskBorderWidth = "0px"; // px - const taskBorderRadius = "10px"; // px - - const taskMarginBottom = "10px"; // px - const taskHorizontalPadding = "20px"; // px - const taskVerticalPadding = "10px"; // px - - // done task - const doneTaskFontColor = "#bbb"; // hex or name - - // focus task - const focusTaskBackgroundColor = "#fff"; // hex only - const focusTaskBackgroundOpacity = 1; // 0.0 - 1.0 - const focusTaskBorderRadius = "5px"; // px - - const focusTaskFontColor = "#000"; // hex or name - - const focusTaskHorizontalPadding = "7px"; // px - const focusTaskVerticalPadding = "0px"; // px - - const titles = [ - "!taskhelp", - "!task", - "!edit", - "!remove", - "!done", - "!botcred", - ]; - const settings = { - enableLimit, - limit, - headerGoogleFont, - taskGoogleFont, - modifyLocalStorage, - showOnlyStreamerTasks, - }; - - const styles = { - taskListBackgroundColor, - taskListBackgroundOpacity, - taskListBorderWidth, - taskListBorderColor, - taskListBorderRadius, - taskListHorizontalPadding, - taskListVerticalPadding, - headerHorizontalPadding, - headerVerticalPadding, - headerBackgroundColor, - headerBackgroundOpacity, - headerBorderWidth, - headerBorderColor, - headerBorderRadius, - headerFontSize, - headerFontWeight, - headerFontFamily, - headerFontColor, - bodyBackgroundColor, - bodyBackgroundOpacity, - bodyBorderWidth, - bodyBorderColor, - bodyBorderRadius, - taskWidth, - lineHeight, - usernameFontWeight, - usernameColor, - usernameFontSize, - doneTaskFontColor, - taskBackgroundColor, - taskBackgroundOpacity, - taskFontFamily, - taskFontSize, - taskFontColor, - taskBorderColor, - taskBorderWidth, - taskBorderRadius, - taskMarginBottom, - taskHorizontalPadding, - taskVerticalPadding, - focusTaskBackgroundColor, - focusTaskBackgroundOpacity, - focusTaskBorderRadius, - focusTaskFontColor, - focusTaskHorizontalPadding, - focusTaskVerticalPadding, + streamer: "RythonDev", + testTasks: false, // true or false + headerGoogleFont: true, // true: use google font, false: use system font + taskGoogleFont: true, // true: use google font, false: use system font + showStreamersTasksOnly: false, // true or false }; const animation = { - scrollSpeed, - gapBetweenScrolls, - titles, + scrollSpeed: 40, // milliseconds + gapBetweenScrolls: 0, // px + titles: [ + "!taskhelp", + "!task", + "!edit", + "!remove", + "!done", + "!undone", + "!botcred", + "!count", + "!points", + "!boardcount", + ], + }; + + const styles = { + // task list + taskListBackgroundColor: "#000000", // hex only + taskListBackgroundOpacity: 0, // 0.0 - 1.0 + + taskListBorderWidth: "0px", // px + taskListBorderColor: "#ffffff", // hex or name + taskListBorderRadius: "0px", // px + + taskListHorizontalPadding: "0px", // px + taskListVerticalPadding: "0px", // px + + // header + headerHorizontalPadding: "10px", // px + headerVerticalPadding: "10px", // px + + headerBackgroundColor: "#fff", // hex only + headerBackgroundOpacity: 1, // 0.0 - 1.0 + + headerBorderWidth: "0px", // px + headerBorderColor: "#ffffff", // hex or name + headerBorderRadius: "3px", // px + + headerFontFamily: "Fredoka", // font name + + headerFontSize: "25px", // px + headerFontWeight: "bold", // normal or bold or number + + headerFontColor: "#000", // hex or name + + // body + bodyBackgroundColor: "#fff", // hex only + bodyBackgroundOpacity: 0, // 0.0 - 1.0 + + bodyBorderWidth: "0px", // px + bodyBorderColor: "#fff", // hex or name + bodyBorderRadius: "5px", // px + + // task + lineHeight: 1.5, // number + usernameFontWeight: "bold", // normal or bold or number + usernameColor: "pink", // hex or name or "" for twitch user color + usernameFontSize: "20px", // px + + taskWidth: "100%", + + taskBackgroundColor: "#000", // hex only + taskBackgroundOpacity: 0, // 0.0 - 1.0 + + taskFontFamily: "Poppins", // font name + + taskFontSize: "20px", // px + taskFontColor: "#fff", // hex or name + + taskBorderColor: "#fff", // hex or name + taskBorderWidth: "0px", // px + taskBorderRadius: "10px", // px + + taskMarginBottom: "10px", // px + taskHorizontalPadding: "20px", // px + taskVerticalPadding: "10px", // px + + // done task + doneTaskFontColor: "#bbb", // hex or name + + // focus task + focusTaskBackgroundColor: "#fff", // hex only + focusTaskBackgroundOpacity: 1, // 0.0 - 1.0 + focusTaskBorderRadius: "5px", // px + + focusTaskFontColor: "#000", // hex or name + + focusTaskHorizontalPadding: "7px", // px + focusTaskVerticalPadding: "0px", // px }; return { diff --git a/get_token.txt b/get_token.txt deleted file mode 100644 index 69978cd..0000000 --- a/get_token.txt +++ /dev/null @@ -1,5 +0,0 @@ -https://id.twitch.tv/oauth2/authorize -?client_id=CLIENT_ID_HERE -&redirect_uri=http://localhost -&response_type=token -&scope=channel:moderate+chat:edit+chat:read+channel:manage:broadcast+user:edit:broadcast+channel:read:redemptions+user:read:email diff --git a/index.html b/index.html index cca9678..08b54cd 100644 --- a/index.html +++ b/index.html @@ -1,32 +1,31 @@ +
+ + + + + - - - - - - + + + + - - - - + - +