commit dae6c593637e075f28c152eb82fb97d973bc67ea
Author: liyunze <50455574+liyunze-coding@users.noreply.github.com>
Date: Wed Aug 2 22:16:30 2023 +0800
first commit
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..55136ef
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+.vscode/*
+styles/taskList.css.map
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..211a20d
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2023 RyanPython
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..d534834
--- /dev/null
+++ b/README.md
@@ -0,0 +1,207 @@
+# Multi-Task widget Infinity (PRIVATE)
+
+
+
+It's basically the same as the original "Multi-Task widget" but with infinite scroll! (more aesthetic, hehe)
+
+## Logs
+
+---
+
+I'll just update you guys on the Discord
+
+---
+
+
+
+## Content
+
+- [Multi-Task widget Infinity (PRIVATE)](#multi-task-widget-infinity-private)
+ - [Logs](#logs)
+ - [Content](#content)
+ - [Commands](#commands)
+ - [Moderators only](#moderators-only)
+ - [Installation](#installation)
+ - [Method 1 (fastest, easiest way)](#method-1-fastest-easiest-way)
+ - [Method 2 (better if you're using an alt account as a bot)](#method-2-better-if-youre-using-an-alt-account-as-a-bot)
+ - [Customization settings](#customization-settings)
+ - [settings](#settings)
+ - [task list styles](#task-list-styles)
+ - [header](#header)
+ - [body](#body)
+ - [task](#task)
+ - [Credits](#credits)
+
+---
+
+## Commands
+
+### Moderators only
+
+- !clear - Clear all tasks
+- !cleardone - Clear all done tasks
+- !adel @user - Remove all tasks from a user
+
+---
+
+## Installation
+
+### Method 1 (fastest, easiest way)
+
+1. Install the zip or clone the repository
+
+2. Go to https://twitchapps.com/tmi/ to create an oauth token (it acts as a password)
+
+3. Setup authentication in `auth.js`
+
+4. Setup `Browser Source` in OBS studio or other streaming software with the following settings:
+
+- Local File: `checked`
+- Local File: `index.html`
+
+### Method 2 (better if you're using an alt account as a bot)
+
+1. Install the zip or clone the repository
+
+2. Create a Twitch application [here](https://dev.twitch.tv/console/apps) \(Log in with your alternate Twitch account if you wish to use a different account as a bot account\)
+
+3. Copy the `Client ID` from the application
+
+4. Create token using `get_token.txt`. Replace `CLIENT_ID` with the `Client ID` from the application
+
+5. Setup authentication in `auth.js`
+
+6. Setup `Browser Source` in OBS studio or other streaming software with the following settings:
+
+- Local File: `checked`
+- Local File: `index.html`
+
+---
+
+## Customization settings
+
+Edit `configs.js` to edit the style of the task list
+
+
+
+---
+
+### settings
+
+`showDoneTasks`:
+
+**true**: show the done tasks
+
+**false**: hide (and remove) the done tasks
+
+`enableLimit`:
+
+**true**: limit the number of incomplete tasks stored in the list
+
+**false**: unlimited incomplete tasks
+
+`limit`: The number of incomplete tasks to store in the list (integer)
+
+`OneScrollPerMS`: Per MS, how many pixels to scroll (integer)
+
+`pauseBetweenScrolls`: How many MS to pause between each end of the scroll (integer)
+
+### task list styles
+
+`taskListWidth`: width of the task list (px)
+
+`taskListHeight`: height of the task list (px)
+
+`taskListBackgroundColor`: background color of the task list (hex only)
+
+`taskListBackgroundOpacity`: opacity of the task list background (0.0 - 1.0)
+
+`taskListBorderWidth`: width of the task list border (px)
+
+`taskListBorderColor`: color of the task list border (hex or name)
+
+`taskListBorderRadius`: how round the task list border should be (px)
+
+`taskListHorizontalPadding`: horizontal padding of the task list (px)
+
+`taskListVerticalPadding`: vertical padding of the task list (px)
+
+### header
+
+`headerBackgroundColor`: background color of the header (hex only)
+
+`headerBackgroundOpacity`: opacity of the header background (0.0 - 1.0)
+
+`headerBorderWidth`: width of the header border (px)
+
+`headerBorderColor`: color of the header border (hex or name)
+
+`headerBorderRadius`: how round the header border should be (px)
+
+`headerFontFamily`: font family of the header (font name)
+
+`headerGoogleFont`: whether to use Google font for the header (true or false)
+
+`headerFontSize`: font size of the header (px)
+
+`headerFontWeight`: font weight of the header (normal, bold, or number)
+
+`headerFontColor`: font color of the header (hex or name)
+
+### body
+
+`bodyBackgroundColor`: background color of the body (hex only)
+
+`bodyBackgroundOpacity`: opacity of the body background (0.0 - 1.0)
+
+`bodyBorderWidth`: width of the body border (px)
+
+`bodyBorderColor`: color of the body border (hex or name)
+
+`bodyBorderRadius`: how round the body border should be (px)
+
+`bodyHorizontalPadding`: horizontal padding of the body (px)
+
+`bodyVerticalPadding`: vertical padding of the body (px)
+
+### task
+
+`lineHeight`: line height of the task (number)
+
+`usernameFontWeight`: font weight of the username (normal, bold, or number)
+
+`usernameColor`: color of the username (hex or name or "" for Twitch user color)
+
+`taskBackgroundColor`: background color of the task (hex only)
+
+`taskBackgroundOpacity`: opacity of the task background (0.0 - 1.0)
+
+`taskFontFamily`: font family of the task (font name)
+
+`taskGoogleFont`: whether to use Google font for the task (true or false)
+
+`taskFontSize`: font size of the task (px)
+
+`taskFontColor`: font color of the task (hex or name)
+
+`taskBorderColor`: color of the task border (hex or name)
+
+`taskBorderWidth`: width of the task border (px)
+
+`taskBorderRadius`: how round the task border should be (px)
+
+`taskMarginBottom`: bottom margin of the task (px)
+
+`taskHorizontalPadding`: horizontal padding of the task (px)
+
+`taskVerticalPadding`: vertical padding of the task (px)
+
+---
+
+## Credits
+
+**Author:** [**@RyanPython**](https://twitch.tv/RyanPython)
+
+**Special thanks to:**
+
+- [**@Instafluff**](https://twitch.tv/Instafluff) \(for the Comfy JS library\)
diff --git a/auth.js b/auth.js
new file mode 100644
index 0000000..f4de491
--- /dev/null
+++ b/auth.js
@@ -0,0 +1,12 @@
+const auth = (function () {
+ // Authentication and channels - required
+ const channel = ""; // your channel
+ const username = ""; // bot account
+ const oauth = ""; // should be oauth:xxxxxxxxxxxx from the bot account DO NOT INCLUDE oauth:
+
+ return {
+ channel,
+ username,
+ oauth,
+ };
+})();
diff --git a/configs.js b/configs.js
new file mode 100644
index 0000000..e1a2d4b
--- /dev/null
+++ b/configs.js
@@ -0,0 +1,313 @@
+const configs = (function () {
+ "use strict";
+
+ // settings
+ const enableLimit = true; // true or false
+ const limit = 20; // integer
+
+ // animation
+ const scrollSpeed = 30; // milliseconds (DO NOT PUT BELOW 5, COMPUTER MIGHT CRASH) the lower the value, the faster the scroll
+ const pauseBetweenScrolls = 2000; // milliseconds
+ const gapBetweenScrolls = "100px"; // px
+
+ // STYLES
+ // task list
+ const taskListWidth = "400px"; // px
+ const taskListHeight = "300px"; // px
+
+ const taskListBackgroundColor = "#000000"; // hex only
+ const taskListBackgroundOpacity = 0; // 0.0 - 1.0
+
+ const taskListBorderWidth = "0px"; // px
+ const taskListBorderColor = "#ffffff"; // hex or name
+ const taskListBorderRadius = "5px"; // px
+
+ const taskListHorizontalPadding = "0px"; // px
+ const taskListVerticalPadding = "0px"; // px
+
+ // header
+ const headerHorizontalPadding = "10px"; // px
+ const headerVerticalPadding = "10px"; // px
+
+ const headerBackgroundColor = "#000000"; // hex only
+ const headerBackgroundOpacity = 0.8; // 0.0 - 1.0
+
+ const headerBorderWidth = "2px"; // px
+ const headerBorderColor = "#ffffff"; // hex or name
+ const headerBorderRadius = "5px"; // 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 = "#ffffff"; // hex or name
+
+ // body
+ const bodyBackgroundColor = "#000000"; // 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 = "#ffc0cb"; // hex or name or "" for twitch user color
+
+ const taskWidth = "98%";
+
+ const taskBackgroundColor = "#000000"; // hex only
+ const taskBackgroundOpacity = 0.7; // 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 = "#ffffff"; // hex or name
+
+ const taskBorderColor = "#000000"; // hex or name
+ const taskBorderWidth = "0px"; // px
+ const taskBorderRadius = "5px"; // px
+
+ const taskMarginBottom = "5px"; // px
+ const taskHorizontalPadding = "20px"; // px
+ const taskVerticalPadding = "10px";
+
+ // Add task commands - please add commands in the exact format
+ const addTaskCommands = [
+ "!taska",
+ "!taskadd",
+ "!atask",
+ "!addtask",
+ "!task",
+ "!add",
+ "!todo",
+ ];
+
+ // Edit task commands - please add commands in the exact format
+ const editTaskCommands = [
+ "!taske",
+ "!taskedit",
+ "!etask",
+ "!edittask",
+ "!edit",
+ ];
+
+ // Delete task commands - please add commands in the exact format
+ const deleteTaskCommands = [
+ "!taskd",
+ "!taskdel",
+ "!taskdelete",
+ "!deltask",
+ "!deletetask",
+ "!taskr",
+ "!taskremove",
+ "!rtask",
+ "!removetask",
+ "!remove",
+ "!delete",
+ ];
+
+ // Finish task commands - please add commands in the exact format
+ const finishTaskCommands = [
+ "!taskf",
+ "!taskfinish",
+ "!ftask",
+ "!finishtask",
+ "!taskd",
+ "!taskdone",
+ "!donetask",
+ "!dtask",
+ "!finish",
+ "!done",
+ "!finished",
+ ];
+
+ // Check task commands - please add commands in the exact format
+ const checkCommands = [
+ "!taskc",
+ "!taskcheck",
+ "!ctask",
+ "!checktask",
+ "!mytask",
+ "!check",
+ ];
+
+ // Help commands - please add commands in the exact format
+ const helpCommands = [
+ "!taskh",
+ "!taskhelp",
+ "!htask",
+ "!helptask",
+ "!tasks",
+ "!help",
+ ];
+
+ // Admin delete - please add commands following the exact format
+ const adminDeleteCommands = [
+ "!taskadel",
+ "!adel",
+ "!adelete",
+ "!admindelete",
+ ];
+
+ // Admin clear done - please add commands following the exact format
+ const adminClearDoneCommands = [
+ "!acleardone",
+ "!admincleardone",
+ "!cleardone",
+ ];
+
+ const adminClearAllCommands = [
+ "!clearall",
+ "!allclear",
+ "!adminclearall",
+ "!adminallclear",
+ "!aclearall",
+ "!aclear",
+ "!clear",
+ ];
+
+ // Responses
+ const taskAdded = 'The task "{message}" has been added, {user}!';
+ const noTaskAdded =
+ "Looks like you already hit the limit of incomplete tasks, {user}";
+ const noTaskContent = "Try using !task the-task-you-are-working-on {user}";
+ const taskDeleted = "Task '{task}' has been deleted successfully, {user}";
+ const specifyTaskIndex = "Try specifying the index of the task {user}";
+
+ const duplicateTask =
+ "Looks like you already have the task '{message}' up there {user}!";
+
+ const adminDeleteTasks = "All of {mentioned}'s tasks have been deleted";
+ const taskFinished = "Good job on finishing the task '{task}', {user}!";
+ const taskEdited =
+ "Task '{originalTask}' has been edited to '{task}' successfully, {user}";
+ const noTaskEdit = "Try doing !edit [index] [new task] {user}";
+
+ const noTask = "Looks like you don't have a task up there {user}";
+ const noTaskA = "Looks like there is no task from that user there {user}";
+ const notMod = "Permission denied, {user}; Mods only";
+ const clearedAll = "All tasks have been cleared!";
+ const clearedDone = "All completed tasks have been cleared!";
+ const specifyUser = "Try specifying a user to delete their tasks {user}";
+ const help = `{user} Use the following commands to help you out - !task !edit !remove !done. For mods, you can do !adel @user. More commmands here: https://github.com/liyunze-coding/Chat-Task-Tic-Overlay/blob/main/MultiTask.md/`;
+ // to edit check task command, go to
+ // scripts/taskList.js
+ // function checkTasks(username)
+
+ const additionalCommands = {
+ "!botcred":
+ "{user} Ryan is the creator of this bot! You can find him on https://github.com/liyunze-coding or https://www.twitch.tv/ryanpython",
+ };
+
+ const titles = [
+ "!taskhelp",
+ "!task",
+ "!edit",
+ "!remove",
+ "!done",
+ "!botcred",
+ ];
+
+ const settings = {
+ enableLimit,
+ limit,
+ headerGoogleFont,
+ taskGoogleFont,
+ };
+
+ const styles = {
+ taskListWidth,
+ taskListHeight,
+ 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,
+ taskBackgroundColor,
+ taskBackgroundOpacity,
+ taskFontFamily,
+ taskFontSize,
+ taskFontColor,
+ taskBorderColor,
+ taskBorderWidth,
+ taskBorderRadius,
+ taskMarginBottom,
+ taskHorizontalPadding,
+ taskVerticalPadding,
+ };
+
+ const animation = {
+ scrollSpeed,
+ pauseBetweenScrolls,
+ gapBetweenScrolls,
+ titles,
+ };
+
+ const commands = {
+ addTaskCommands,
+ editTaskCommands,
+ deleteTaskCommands,
+ finishTaskCommands,
+ helpCommands,
+ checkCommands,
+ adminDeleteCommands,
+ adminClearDoneCommands,
+ adminClearAllCommands,
+ additionalCommands,
+ };
+
+ const responses = {
+ taskAdded,
+ noTaskAdded,
+ noTaskContent,
+ taskDeleted,
+ specifyTaskIndex,
+ duplicateTask,
+ taskFinished,
+ taskEdited,
+ noTaskEdit,
+ noTask,
+ noTaskA,
+ notMod,
+ help,
+ adminDeleteTasks,
+ clearedAll,
+ clearedDone,
+ specifyUser,
+ };
+
+ return {
+ settings,
+ styles,
+ animation,
+ commands,
+ responses,
+ };
+})();
diff --git a/get_token.txt b/get_token.txt
new file mode 100644
index 0000000..69978cd
--- /dev/null
+++ b/get_token.txt
@@ -0,0 +1,5 @@
+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/images/labels.png b/images/labels.png
new file mode 100644
index 0000000..7390580
Binary files /dev/null and b/images/labels.png differ
diff --git a/images/preview.png b/images/preview.png
new file mode 100644
index 0000000..80960dc
Binary files /dev/null and b/images/preview.png differ
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..cca9678
--- /dev/null
+++ b/index.html
@@ -0,0 +1,44 @@
+
+
+
+