mirror of
https://github.com/GuySandler/CanvasRefined.git
synced 2026-06-21 01:49:54 +02:00
quick fix
This commit is contained in:
parent
61ef8e163c
commit
be3bc0a428
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"Canvas Refined": {
|
"Canvas_Refined": {
|
||||||
"message": "Canvas Refined"
|
"message": "Canvas Refined"
|
||||||
},
|
},
|
||||||
"updates": {
|
"updates": {
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<div class="main">
|
<div class="main">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<img id="bclogo" src="../icon/icon-128.png">
|
<img id="bclogo" src="../icon/icon-128.png">
|
||||||
<h1 data-i18n="Canvas Refined">Canvas Refined</h1>
|
<h1 data-i18n="Canvas_Refined">Canvas Refined</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="more-options-container">
|
<div class="more-options-container">
|
||||||
<button id="customize-dark-btn" class="big-button tab-btn">
|
<button id="customize-dark-btn" class="big-button tab-btn">
|
||||||
@ -232,6 +232,10 @@
|
|||||||
<input type="checkbox" id="todo_progress_rings" name="todo_progress_rings">
|
<input type="checkbox" id="todo_progress_rings" name="todo_progress_rings">
|
||||||
<label for="todo_progress_rings" class="sub-text">Show progress rings</label>
|
<label for="todo_progress_rings" class="sub-text">Show progress rings</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="sub-option">
|
||||||
|
<input type="checkbox" id="todo_confetti" name="todo_confetti">
|
||||||
|
<label for="todo_confetti" class="sub-text">Show confetti on complete</label>
|
||||||
|
</div>
|
||||||
<div style="margin-top: 5px">
|
<div style="margin-top: 5px">
|
||||||
<span class="sub-text" data-i18n="max_items">Max items to show: </span><span
|
<span class="sub-text" data-i18n="max_items">Max items to show: </span><span
|
||||||
id="numTodoItems"></span>
|
id="numTodoItems"></span>
|
||||||
|
|||||||
@ -2120,6 +2120,8 @@ function populateAnnouncements() {
|
|||||||
|
|
||||||
function createConfettiBurst(targetElement, opts = {}) {
|
function createConfettiBurst(targetElement, opts = {}) {
|
||||||
try {
|
try {
|
||||||
|
if (options.todo_confetti === false) return;
|
||||||
|
|
||||||
const count = opts.count || 48;
|
const count = opts.count || 48;
|
||||||
const colors = opts.colors || ['#ff4d4f', '#ffc107', '#28a745', '#17a2b8', '#6f42c1', '#ff6b6b', '#ff8a65', '#ffd54f'];
|
const colors = opts.colors || ['#ff4d4f', '#ffc107', '#28a745', '#17a2b8', '#6f42c1', '#ff6b6b', '#ff8a65', '#ffd54f'];
|
||||||
const rect = targetElement.getBoundingClientRect();
|
const rect = targetElement.getBoundingClientRect();
|
||||||
|
|||||||
@ -2,6 +2,7 @@ const syncedSwitches = ['remind', 'tab_icons', 'hide_feedback', 'dark_mode', 're
|
|||||||
const syncedSubOptions = [
|
const syncedSubOptions = [
|
||||||
"todo_hide_feedback",
|
"todo_hide_feedback",
|
||||||
"todo_full_height",
|
"todo_full_height",
|
||||||
|
"todo_confetti",
|
||||||
"device_dark",
|
"device_dark",
|
||||||
"relative_dues",
|
"relative_dues",
|
||||||
"card_overdues",
|
"card_overdues",
|
||||||
@ -113,6 +114,7 @@ const defaultOptions = {
|
|||||||
"todo_hide_feedback": false,
|
"todo_hide_feedback": false,
|
||||||
"todo_full_height": false,
|
"todo_full_height": false,
|
||||||
"todo_progress_rings": true,
|
"todo_progress_rings": true,
|
||||||
|
"todo_confetti": true,
|
||||||
"device_dark": false,
|
"device_dark": false,
|
||||||
"cumulative_gpa": { "name": "Cumulative GPA", "hidden": false, "weight": "dnc", "credits": 999, "gr": 3.21 },
|
"cumulative_gpa": { "name": "Cumulative GPA", "hidden": false, "weight": "dnc", "credits": 999, "gr": 3.21 },
|
||||||
// "show_updates": false,
|
// "show_updates": false,
|
||||||
@ -305,6 +307,7 @@ function setup() {
|
|||||||
// /*'card_method_date',*/ "show_updates",
|
// /*'card_method_date',*/ "show_updates",
|
||||||
"todo_hide_feedback",
|
"todo_hide_feedback",
|
||||||
"todo_progress_rings",
|
"todo_progress_rings",
|
||||||
|
"todo_confetti",
|
||||||
"todo_full_height",
|
"todo_full_height",
|
||||||
"device_dark",
|
"device_dark",
|
||||||
"relative_dues",
|
"relative_dues",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user