version 2.0
This commit is contained in:
parent
de75b3cd4c
commit
72da262759
6 changed files with 453 additions and 1045 deletions
236
configs.js
236
configs.js
|
|
@ -1,165 +1,105 @@
|
||||||
const configs = (function () {
|
const configs = (function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
// settings
|
const settings = {
|
||||||
const enableLimit = false; // true or false
|
streamer: "RythonDev",
|
||||||
const limit = 10; // integer
|
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 modifyLocalStorage = false; // true or false
|
const animation = {
|
||||||
const showOnlyStreamerTasks = false; // true or false
|
scrollSpeed: 40, // milliseconds
|
||||||
|
gapBetweenScrolls: 0, // px
|
||||||
// animation
|
titles: [
|
||||||
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",
|
"!taskhelp",
|
||||||
"!task",
|
"!task",
|
||||||
"!edit",
|
"!edit",
|
||||||
"!remove",
|
"!remove",
|
||||||
"!done",
|
"!done",
|
||||||
|
"!undone",
|
||||||
"!botcred",
|
"!botcred",
|
||||||
];
|
"!count",
|
||||||
|
"!points",
|
||||||
const settings = {
|
"!boardcount",
|
||||||
enableLimit,
|
],
|
||||||
limit,
|
|
||||||
headerGoogleFont,
|
|
||||||
taskGoogleFont,
|
|
||||||
modifyLocalStorage,
|
|
||||||
showOnlyStreamerTasks,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
taskListBackgroundColor,
|
// task list
|
||||||
taskListBackgroundOpacity,
|
taskListBackgroundColor: "#000000", // hex only
|
||||||
taskListBorderWidth,
|
taskListBackgroundOpacity: 0, // 0.0 - 1.0
|
||||||
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,
|
|
||||||
};
|
|
||||||
|
|
||||||
const animation = {
|
taskListBorderWidth: "0px", // px
|
||||||
scrollSpeed,
|
taskListBorderColor: "#ffffff", // hex or name
|
||||||
gapBetweenScrolls,
|
taskListBorderRadius: "0px", // px
|
||||||
titles,
|
|
||||||
|
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 {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
|
@ -8,8 +7,8 @@
|
||||||
<script src="http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/comfy.js@latest/dist/comfy.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/comfy.js@latest/dist/comfy.min.js"></script>
|
||||||
|
|
||||||
<script src="./auth.js"></script>
|
|
||||||
<script src="./configs.js"></script>
|
<script src="./configs.js"></script>
|
||||||
|
<script defer src="scripts/defaultConfigs.js"></script>
|
||||||
<script defer src="scripts/index.js"></script>
|
<script defer src="scripts/index.js"></script>
|
||||||
<script defer src="scripts/taskList.js"></script>
|
<script defer src="scripts/taskList.js"></script>
|
||||||
|
|
||||||
|
|
@ -40,5 +39,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
110
scripts/defaultConfigs.js
Normal file
110
scripts/defaultConfigs.js
Normal file
|
|
@ -0,0 +1,110 @@
|
||||||
|
const defaultConfigs = (function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
const settings = {
|
||||||
|
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: true, // true or false
|
||||||
|
};
|
||||||
|
|
||||||
|
const animation = {
|
||||||
|
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 {
|
||||||
|
settings,
|
||||||
|
styles,
|
||||||
|
animation,
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
|
@ -87,7 +87,3 @@ ComfyJS.onCommand = (user, command, message, flags, extra) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (configs.settings.modifyLocalStorage) {
|
|
||||||
ComfyJS.Init(auth.username, `oauth:${auth.oauth}`, [auth.channel]);
|
|
||||||
}
|
|
||||||
|
|
|
||||||
1029
scripts/taskList.js
1029
scripts/taskList.js
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue