better todolist 6

final, config
This commit is contained in:
Guy Sandler 2026-04-28 21:42:26 -07:00
parent b5bcd19466
commit a0e26918ad
5 changed files with 392 additions and 349 deletions

View File

@ -110,6 +110,12 @@
"show_past_due": { "show_past_due": {
"message": "Show Past Due" "message": "Show Past Due"
}, },
"todo_separate_scrollbar": {
"message": "Separate Scrollbar"
},
"todo_full_height": {
"message": "Force Full Height"
},
"relative_due_dates": { "relative_due_dates": {
"message": "Relative Due Dates" "message": "Relative Due Dates"
}, },
@ -128,7 +134,7 @@
"tab_icons": { "tab_icons": {
"message": "Color Coded Tab Icons" "message": "Color Coded Tab Icons"
}, },
"todo_colors": { "todo_hide_feedback": {
"message": "Hide Recent Feedback" "message": "Hide Recent Feedback"
}, },
"gpa_calc_cumulative": { "gpa_calc_cumulative": {

View File

@ -169,7 +169,8 @@
</div> </div>
</div> </div>
</div> </div>
<div class="option-container"> <div class="option-container" style="display:none">
<!-- TODO: scrapped maybe forever -->
<div class="option" id="remind"> <div class="option" id="remind">
<input type="radio" id="off" name="remind"> <input type="radio" id="off" name="remind">
<input type="radio" id="on" name="remind"> <input type="radio" id="on" name="remind">
@ -206,27 +207,26 @@
<span class="option-name" data-i18n="better_todo">Better Todo List</span> <span class="option-name" data-i18n="better_todo">Better Todo List</span>
</div> </div>
<div class="sub-options"> <div class="sub-options">
<div class="sub-option"> <div class="sub-option" style="display:none;">
<input type="checkbox" id="hover_preview" name="hover_preview"> <input type="checkbox" id="hover_preview" name="hover_preview">
<label for="hover_preview" class="sub-text" data-i18n="hover_preview">Hover to preview <label for="hover_preview" class="sub-text" data-i18n="hover_preview">Hover to preview
details</label> <!-- TODO --> details</label> <!-- TODO: Later -->
</div> </div>
<div class="sub-option"> <div class="sub-option">
<input type="checkbox" id="hide_completed" name="hide_completed"> <input type="checkbox" id="todo_separate_scrollbar" name="todo_separate_scrollbar">
<label for="hide_completed" class="sub-text" data-i18n="hide_completed">Hide <label for="todo_separate_scrollbar" class="sub-text" data-i18n="todo_separate_scrollbar">Separate Scrollbar</label>
completed</label> <!-- TO REMOVE replace with "own scrollbar" -->
</div> </div>
<div class="sub-option"> <div class="sub-option">
<input type="checkbox" id="todo_hr24" name="todo_hr24"> <input type="checkbox" id="todo_hr24" name="todo_hr24">
<label for="todo_hr24" class="sub-text" data-i18n="24hrformat">Use 24hr format</label> <!-- TODO --> <label for="todo_hr24" class="sub-text" data-i18n="24hrformat">Use 24hr format</label>
</div> </div>
<div class="sub-option"> <div class="sub-option">
<input type="checkbox" id="todo_overdues" name="todo_overdues"> <input type="checkbox" id="todo_full_height" name="todo_full_height">
<label for="todo_overdues" class="sub-text" data-i18n="show_past_due">Show past due</label> <!-- TO REMOVE and replace with full height --> <label for="todo_full_height" class="sub-text" data-i18n="todo_full_height">Force Full Height</label> <!-- TO REMOVE and replace with full height -->
</div> </div>
<div class="sub-option"> <div class="sub-option">
<input type="checkbox" id="todo_hide_feedback" name="todo_hide_feedback"> <input type="checkbox" id="todo_hide_feedback" name="todo_hide_feedback">
<label for="todo_hide_feedback" class="sub-text" data-i18n="todo_hide_feedback">Hide Recent Feedback</label> <!-- TO REMOVE and replace with recent feedback --> <label for="todo_hide_feedback" class="sub-text" data-i18n="todo_hide_feedback">Hide Recent Feedback</label>
</div> </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

View File

@ -39,6 +39,7 @@ chrome.runtime.onInstalled.addListener(function () {
"dashboard_notes_text": "", "dashboard_notes_text": "",
"better_todo": false, "better_todo": false,
"todo_hr24": false, "todo_hr24": false,
"todo_separate_scrollbar": false,
"condensed_cards": false, "condensed_cards": false,
"custom_cards": {}, "custom_cards": {},
"custom_cards_2": {}, "custom_cards_2": {},
@ -46,7 +47,7 @@ chrome.runtime.onInstalled.addListener(function () {
"custom_assignments": [], "custom_assignments": [],
"custom_assignments_overflow": ["custom_assignments"], "custom_assignments_overflow": ["custom_assignments"],
"grade_hover": false, "grade_hover": false,
"hide_completed": false, // "hide_completed": false,
"num_todo_items": 10, "num_todo_items": 10,
"custom_font": { "link": "", "family": "" }, "custom_font": { "link": "", "family": "" },
"hover_preview": true, "hover_preview": true,
@ -67,7 +68,7 @@ chrome.runtime.onInstalled.addListener(function () {
"D-": { "cutoff": 60, "gpa": .7 }, "D-": { "cutoff": 60, "gpa": .7 },
"F": { "cutoff": 0, "gpa": 0 } "F": { "cutoff": 0, "gpa": 0 }
}, },
"todo_overdues": false, // "todo_overdues": false,
"card_overdues": false, "card_overdues": false,
"relative_dues": false, "relative_dues": false,
"hide_feedback": false, "hide_feedback": false,
@ -75,9 +76,10 @@ chrome.runtime.onInstalled.addListener(function () {
"assignment_states": {}, "assignment_states": {},
"tab_icons": false, "tab_icons": false,
"todo_hide_feedback": false, "todo_hide_feedback": false,
"todo_full_height": false,
"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,
"card_method_date": false, "card_method_date": false,
"card_method_dashboard": true, "card_method_dashboard": true,
"card_limit": 25, "card_limit": 25,
@ -85,8 +87,8 @@ chrome.runtime.onInstalled.addListener(function () {
"reminders": [], "reminders": [],
"reminder_count": 1, "reminder_count": 1,
"multi_remind": false, "multi_remind": false,
"scheduledReminder": false, // "scheduledReminder": false,
"scheduledReminderTime": { "hour": "09", "minute": "00" }, // "scheduledReminderTime": { "hour": "09", "minute": "00" },
"id": "", "id": "",
"new_browser": null, "new_browser": null,
"gpa_calc_cumulative": false, "gpa_calc_cumulative": false,

View File

@ -188,38 +188,38 @@ function showExampleReminder() {
example.querySelector(".bettercanvas-reminder-due").textContent = "This notification will pop up in other pages to remind you of incomplete assignments that are due in less than 6 hours." /*It will notify again at 2 hours if the 'Remind 2x' option is on."*/; example.querySelector(".bettercanvas-reminder-due").textContent = "This notification will pop up in other pages to remind you of incomplete assignments that are due in less than 6 hours." /*It will notify again at 2 hours if the 'Remind 2x' option is on."*/;
} }
async function ScheduledReminderCheck() { // async function ScheduledReminderCheck() {
let date = new Date(); // let date = new Date();
let currentHour = date.getHours(); // let currentHour = date.getHours();
let currentMinute = date.getMinutes(); // let currentMinute = date.getMinutes();
if (options.scheduledReminderTime) { // if (options.scheduledReminderTime) {
let [hour, minute] = options.scheduledReminderTime.split(":"); // let [hour, minute] = options.scheduledReminderTime.split(":");
if (parseInt(hour) == currentHour && parseInt(minute) == currentMinute) { // if (parseInt(hour) == currentHour && parseInt(minute) == currentMinute) {
const container = document.getElementById("bettercanvas-reminders") || makeElement("div", document.body, { "id": "bettercanvas-reminders" }); // const container = document.getElementById("bettercanvas-reminders") || makeElement("div", document.body, { "id": "bettercanvas-reminders" });
container.style.display = "flex"; // container.style.display = "flex";
container.textContent = ""; // container.textContent = "";
const storage = await chrome.storage.sync.get("reminders"); // const storage = await chrome.storage.sync.get("reminders");
const now = (new Date()).getTime(); // const now = (new Date()).getTime();
storage["reminders"].forEach(reminder => { // storage["reminders"].forEach(reminder => {
if (reminder.d >= now) { // if (reminder.d >= now) {
createReminder(reminder, container); // createReminder(reminder, container);
} // }
}); // });
} // }
} // }
} // }
function toggleScheduledReminders() { // function toggleScheduledReminders() {
clearInterval(reminderCheck); // clearInterval(reminderCheck);
if (options.scheduledReminder !== true) return; // if (options.scheduledReminder !== true) return;
ScheduledReminderCheck(); // ScheduledReminderCheck();
reminderCheck = setInterval(ScheduledReminderCheck, 60000); // reminderCheck = setInterval(ScheduledReminderCheck, 60000);
} // }
isDomainCanvasPage(); isDomainCanvasPage();
function isDomainCanvasPage() { function isDomainCanvasPage() {
chrome.storage.sync.get(['custom_domain', 'dark_mode', 'dark_preset', 'device_dark', 'remind', 'scheduledReminder', 'scheduledReminderTime'], result => { chrome.storage.sync.get(['custom_domain', 'dark_mode', 'dark_preset', 'device_dark', 'remind'/*, 'scheduledReminder', 'scheduledReminderTime'*/], result => {
options = result; options = result;
if (result.custom_domain.length && result.custom_domain[0] !== "") { if (result.custom_domain.length && result.custom_domain[0] !== "") {
for (let i = 0; i < result.custom_domain.length; i++) { for (let i = 0; i < result.custom_domain.length; i++) {
@ -232,14 +232,14 @@ function isDomainCanvasPage() {
// if the code reaches this point, its not a canvas page so run the reminders // if the code reaches this point, its not a canvas page so run the reminders
setTimeout(reminderWatch, 2000); setTimeout(reminderWatch, 2000);
setInterval(reminderWatch, 60000); setInterval(reminderWatch, 60000);
toggleScheduledReminders(); // toggleScheduledReminders();
// turn the reminders on/off if the option is changed // turn the reminders on/off if the option is changed
chrome.storage.onChanged.addListener((changes) => { chrome.storage.onChanged.addListener((changes) => {
Object.keys(changes).forEach(key => { Object.keys(changes).forEach(key => {
if (key === "remind") reminderWatch(); if (key === "remind") reminderWatch();
if (key === "scheduledReminder" || key === "scheduledReminderTime") { if (key === "scheduledReminder" || key === "scheduledReminderTime") {
options[key] = changes[key].newValue; options[key] = changes[key].newValue;
toggleScheduledReminders(); // toggleScheduledReminders();
} }
}) })
}) })
@ -255,7 +255,7 @@ function startExtension() {
chrome.storage.sync.get(null, result => { chrome.storage.sync.get(null, result => {
options = { ...options, ...result }; options = { ...options, ...result };
toggleAutoDarkMode(); toggleAutoDarkMode();
toggleScheduledReminders(); // toggleScheduledReminders();
getApiData(); getApiData();
checkDashboardReady(); checkDashboardReady();
loadCustomFont(); loadCustomFont();
@ -335,10 +335,12 @@ function applyOptionsChanges(changes) {
customizeCards(); customizeCards();
break; break;
case "todo_hr24": case "todo_hr24":
case "todo_separate_scrollbar":
case "num_todo_items": case "num_todo_items":
case "hover_preview": case "hover_preview":
case "todo_overdues": // case "todo_overdues":
case "todo_hide_feedback": case "todo_hide_feedback":
case "todo_full_height":
case "custom_cards_3": case "custom_cards_3":
moreAnnouncementCount = 0; moreAnnouncementCount = 0;
moreAssignmentCount = 0; moreAssignmentCount = 0;
@ -367,16 +369,16 @@ function applyOptionsChanges(changes) {
case "custom_styles": case "custom_styles":
applyAestheticChanges(); applyAestheticChanges();
break; break;
case "show_updates": // case "show_updates":
showUpdateMsg(); // showUpdateMsg();
break; // break;
case "remind": case "remind":
showExampleReminder(); showExampleReminder();
break; break;
case "scheduledReminder": // case "scheduledReminder":
case "scheduledReminderTime": // case "scheduledReminderTime":
toggleScheduledReminders(); // toggleScheduledReminders();
break; // break;
case "imageSize": case "imageSize":
case "cardRoundness": case "cardRoundness":
case "cardSpacing": case "cardSpacing":
@ -836,7 +838,7 @@ function convertToDueDate(dueAt) {
final = "due "; final = "due ";
let date = new Date(dueAt); let date = new Date(dueAt);
final += date.toLocaleString("en-US", { month: "short", day: "numeric" }); final += date.toLocaleString("en-US", { month: "short", day: "numeric" });
final += " at " + date.toLocaleString("en-US", { hour: "numeric", minute: "numeric", hour12: true }); final += " at " + date.toLocaleString("en-US", { hour: "numeric", minute: "numeric", hour12: !options.todo_hr24 });
return final; return final;
} }
function updateIndicator(element) { function updateIndicator(element) {
@ -1001,6 +1003,34 @@ async function createTodoSections(location) {
if (betterTodoFilter == "completed") { if (betterTodoFilter == "completed") {
populateAssignments(true); populateAssignments(true);
} }
const feedbackElement = document.querySelector(".recent_feedback");
if (feedbackElement) {
if (options.todo_hide_feedback == true) {
feedbackElement.style.display = "none";
} else {
feedbackElement.style.display = "block";
}
}
const sidebar = document.getElementById("right-side-wrapper");
if (options.todo_full_height) {
sidebar.style.minHeight = "100vh";
} else {
sidebar.style.minHeight = "";
}
if (options.todo_separate_scrollbar) {
sidebar.style.position = "sticky";
sidebar.style.top = "0";
sidebar.style.height = "100vh";
sidebar.style.overflowY = "auto";
} else {
sidebar.style.position = "";
sidebar.style.top = "";
sidebar.style.height = "";
sidebar.style.overflowY = "";
// maybe invisible scrollbar?
}
}); });
} }
@ -1133,9 +1163,6 @@ function populateAssignments(iscompleted = false) {
isExpanded = !isExpanded; isExpanded = !isExpanded;
}) })
} }
if (options.todo_hide_feedback) {
document.querySelector(".recent_feedback").remove();
}
} }
function populateAnnouncements() { function populateAnnouncements() {
@ -1734,27 +1761,27 @@ function autoDarkModeCheck() {
} }
} }
async function ScheduledReminderCheck() { // async function ScheduledReminderCheck() {
let date = new Date(); // let date = new Date();
let currentHour = date.getHours(); // let currentHour = date.getHours();
let currentMinute = date.getMinutes(); // let currentMinute = date.getMinutes();
if (options.scheduledReminderTime) { // if (options.scheduledReminderTime) {
let [hour, minute] = options.scheduledReminderTime.split(":"); // let [hour, minute] = options.scheduledReminderTime.split(":");
if (parseInt(hour) == currentHour && parseInt(minute) == currentMinute) { // if (parseInt(hour) == currentHour && parseInt(minute) == currentMinute) {
const container = document.getElementById("bettercanvas-reminders") || makeElement("div", document.body, { "id": "bettercanvas-reminders" }); // const container = document.getElementById("bettercanvas-reminders") || makeElement("div", document.body, { "id": "bettercanvas-reminders" });
container.style.display = "flex"; // container.style.display = "flex";
container.textContent = ""; // container.textContent = "";
const storage = await chrome.storage.sync.get("reminders"); // const storage = await chrome.storage.sync.get("reminders");
const now = (new Date()).getTime(); // const now = (new Date()).getTime();
storage["reminders"].forEach(reminder => { // storage["reminders"].forEach(reminder => {
if (reminder.d >= now) { // if (reminder.d >= now) {
createReminder(reminder, container); // createReminder(reminder, container);
} // }
}); // });
} // }
} // }
} // }
function toggleAutoDarkMode() { function toggleAutoDarkMode() {
clearInterval(timeCheck); clearInterval(timeCheck);
@ -1763,12 +1790,12 @@ function toggleAutoDarkMode() {
timeCheck = setInterval(autoDarkModeCheck, 60000); timeCheck = setInterval(autoDarkModeCheck, 60000);
} }
function toggleScheduledReminders() { // function toggleScheduledReminders() {
clearInterval(reminderCheck); // clearInterval(reminderCheck);
if (options.scheduled_reminders === false) return; //TODO: add it to the options thing // if (options.scheduled_reminders === false) return; //TODO: add it to the options thing
ScheduledReminderCheck(); // ScheduledReminderCheck();
reminderCheck = setInterval(ScheduledReminderCheck, 60000); // reminderCheck = setInterval(ScheduledReminderCheck, 60000);
} // }
let iframeObserver; let iframeObserver;
function runiframeChecker() { function runiframeChecker() {

View File

@ -1,10 +1,11 @@
const syncedSwitches = ['remind', 'tab_icons', 'hide_feedback', 'dark_mode', 'remlogo', 'full_width', 'auto_dark', 'assignments_due', 'gpa_calc', 'gradient_cards', 'disable_color_overlay', 'dashboard_grades', 'dashboard_notes', 'better_todo', 'condensed_cards']; const syncedSwitches = ['remind', 'tab_icons', 'hide_feedback', 'dark_mode', 'remlogo', 'full_width', 'auto_dark', 'assignments_due', 'gpa_calc', 'gradient_cards', 'disable_color_overlay', 'dashboard_grades', 'dashboard_notes', 'better_todo', 'condensed_cards'];
const syncedSubOptions = [ const syncedSubOptions = [
"todo_hide_feedback", "todo_hide_feedback",
"todo_full_height",
"device_dark", "device_dark",
"relative_dues", "relative_dues",
"card_overdues", "card_overdues",
"todo_overdues", // "todo_overdues",
"gpa_calc_prepend", "gpa_calc_prepend",
"auto_dark", "auto_dark",
"auto_dark_start", "auto_dark_start",
@ -12,12 +13,13 @@ const syncedSubOptions = [
"num_assignments", "num_assignments",
"assignment_date_format", "assignment_date_format",
"todo_hr24", "todo_hr24",
"todo_separate_scrollbar",
"grade_hover", "grade_hover",
"hide_completed", // "hide_completed",
"num_todo_items", "num_todo_items",
"hover_preview", "hover_preview",
"scheduledReminder", // "scheduledReminder",
"scheduledReminderTime", // "scheduledReminderTime",
"customCardStyles", "customCardStyles",
"imageSize", "imageSize",
"cardRoundness", "cardRoundness",
@ -68,6 +70,7 @@ const defaultOptions = {
"dashboard_notes_text": "", "dashboard_notes_text": "",
"better_todo": false, "better_todo": false,
"todo_hr24": false, "todo_hr24": false,
"todo_separate_scrollbar": false,
"condensed_cards": false, "condensed_cards": false,
"custom_cards": {}, "custom_cards": {},
"custom_cards_2": {}, "custom_cards_2": {},
@ -75,7 +78,7 @@ const defaultOptions = {
"custom_assignments": [], "custom_assignments": [],
"custom_assignments_overflow": ["custom_assignments"], "custom_assignments_overflow": ["custom_assignments"],
"grade_hover": false, "grade_hover": false,
"hide_completed": false, // "hide_completed": false,
"num_todo_items": 10, "num_todo_items": 10,
"custom_font": { "link": "", "family": "" }, "custom_font": { "link": "", "family": "" },
"hover_preview": true, "hover_preview": true,
@ -96,7 +99,7 @@ const defaultOptions = {
"D-": { "cutoff": 60, "gpa": .7 }, "D-": { "cutoff": 60, "gpa": .7 },
"F": { "cutoff": 0, "gpa": 0 } "F": { "cutoff": 0, "gpa": 0 }
}, },
"todo_overdues": false, // "todo_overdues": false,
"card_overdues": false, "card_overdues": false,
"relative_dues": false, "relative_dues": false,
"hide_feedback": false, "hide_feedback": false,
@ -104,14 +107,15 @@ const defaultOptions = {
"assignment_states": {}, "assignment_states": {},
"tab_icons": false, "tab_icons": false,
"todo_hide_feedback": false, "todo_hide_feedback": false,
"todo_full_height": false,
"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,
"card_method_date": false, "card_method_date": false,
"card_method_dashboard": true, "card_method_dashboard": true,
"card_limit": 25, "card_limit": 25,
"scheduledReminder": false, // "scheduledReminder": false,
"scheduledReminderTime": { "hour": "09", "minute": "00" }, // "scheduledReminderTime": { "hour": "09", "minute": "00" },
"imageSize": 100, "imageSize": 100,
"cardRoundness": 5, "cardRoundness": 5,
"cardSpacing": 0, "cardSpacing": 0,
@ -196,14 +200,14 @@ function setupAutoDarkInput(initial, time) {
}); });
} }
function setupScheduledReminderInput(initial) { // function setupScheduledReminderInput(initial) {
let el = document.querySelector('#scheduledReminderTime'); // let el = document.querySelector('#scheduledReminderTime');
el.value = initial.hour + ":" + initial.minute; // el.value = initial.hour + ":" + initial.minute;
el.addEventListener('change', function () { // el.addEventListener('change', function () {
let timeinput = { "hour": this.value.split(':')[0], "minute": this.value.split(':')[1] }; // let timeinput = { "hour": this.value.split(':')[0], "minute": this.value.split(':')[1] };
chrome.storage.sync.set({ scheduledReminderTime: timeinput }); // chrome.storage.sync.set({ scheduledReminderTime: timeinput });
}); // });
} // }
function setupCardLimitSlider(initial) { function setupCardLimitSlider(initial) {
let el = document.querySelector("#card_limit"); let el = document.querySelector("#card_limit");
@ -282,20 +286,22 @@ function setup() {
"browser_show_likes", "browser_show_likes",
"gpa_calc_weighted", "gpa_calc_weighted",
"gpa_calc_cumulative", "gpa_calc_cumulative",
/*'card_method_date',*/ "show_updates", // /*'card_method_date',*/ "show_updates",
"todo_hide_feedback", "todo_hide_feedback",
"todo_full_height",
"device_dark", "device_dark",
"relative_dues", "relative_dues",
"card_overdues", "card_overdues",
"todo_overdues", // "todo_overdues",
"gpa_calc_prepend", "gpa_calc_prepend",
"auto_dark", "auto_dark",
"assignment_date_format", "assignment_date_format",
"todo_hr24", "todo_hr24",
"todo_separate_scrollbar",
"grade_hover", "grade_hover",
"hide_completed", // "hide_completed",
"hover_preview", "hover_preview",
"scheduledReminder", // "scheduledReminder",
"customCardStyles", "customCardStyles",
], ],
tabs: { tabs: {
@ -357,10 +363,10 @@ function setup() {
identifier: "custom_styles", identifier: "custom_styles",
setup: (initial) => setupCustomStyle(initial), setup: (initial) => setupCustomStyle(initial),
}, },
{ // {
identifier: "scheduledReminderTime", // identifier: "scheduledReminderTime",
setup: (initial) => setupScheduledReminderInput(initial), // setup: (initial) => setupScheduledReminderInput(initial),
}, // },
{ {
identifier: "imageSize", identifier: "imageSize",
setup: (initial) => setupImageSizeInput(initial), setup: (initial) => setupImageSizeInput(initial),
@ -410,7 +416,9 @@ function setup() {
chrome.storage.sync.get(menu.checkboxes, sync => { chrome.storage.sync.get(menu.checkboxes, sync => {
menu.checkboxes.forEach(option => { menu.checkboxes.forEach(option => {
document.querySelector("#" + option).addEventListener("change", function (e) { const checkbox = document.querySelector("#" + option);
if (!checkbox) {console.log(option); return;}
checkbox.addEventListener("change", function (e) {
let status = this.checked; let status = this.checked;
chrome.storage.sync.set(JSON.parse(`{"${option}": ${status}}`)); chrome.storage.sync.set(JSON.parse(`{"${option}": ${status}}`));
}); });