Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox: Mixed Mode Themed Favicon Issue #72

Merged
merged 101 commits into from
Oct 10, 2021
Merged
Show file tree
Hide file tree
Changes from 95 commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
a0c7b23
initial commit
ZimCodes Dec 10, 2020
3984698
This is the base functionality of Doki Theme.
ZimCodes Dec 11, 2020
6c2ec90
Search functionality is now operable in new custom tab page;
ZimCodes Dec 11, 2020
85a6c2d
New custom tab pages are now called 'Waifu Tab';
ZimCodes Dec 12, 2020
3d7d84a
Completes Aqua & Ishtar themes
ZimCodes Dec 12, 2020
8e79836
Adds more waifu themes to complete; 10 waifus can now be set as backg…
ZimCodes Dec 14, 2020
e1424a8
Adds 5 more Waifu themes
ZimCodes Dec 15, 2020
6cee46f
Adds 13 more waifu themes;Adds a permissions file, which explains the…
ZimCodes Dec 17, 2020
cafafbf
Change location of files
ZimCodes Dec 17, 2020
1226dd8
Adds Doki Firefox Edition
ZimCodes Dec 17, 2020
df07727
Update Readme with Firefox section
ZimCodes Dec 17, 2020
e6a0297
relocate files
ZimCodes Dec 17, 2020
a2bb9c2
update readme
ZimCodes Dec 17, 2020
e8e3c1d
New permission needed: Storage; Storage is used to add all waifu choi…
ZimCodes Dec 17, 2020
9d1bb51
Merge branch 'firefox'
ZimCodes Dec 17, 2020
6673c51
Merges firefox branch; Updates CHANGELOG
ZimCodes Dec 17, 2020
20af417
Update manifest
ZimCodes Dec 17, 2020
3cecb2a
Update manifest
ZimCodes Dec 17, 2020
4284330
Can now choose a theme at random; Increase tab text brightness for me…
ZimCodes Dec 17, 2020
107a08b
merge from firefox branch
ZimCodes Dec 17, 2020
43ffb46
Refactors code making great use of the local storage api. Instead of …
ZimCodes Dec 18, 2020
3241e68
Kanna's sidebar now has a theme applied to it
ZimCodes Dec 18, 2020
a6a9ce6
Update permission of firefox branch with master
ZimCodes Dec 18, 2020
d344669
merge from firefox
ZimCodes Dec 18, 2020
f2ea570
Update manifest
ZimCodes Dec 18, 2020
00627c1
Merge branch 'firefox'
ZimCodes Dec 18, 2020
d4dd22b
Removes XML declaration;
ZimCodes Dec 19, 2020
b77bccd
Removes merge files outside of firefox folder
ZimCodes Dec 19, 2020
d7a96b8
Merge branch 'firefox'
ZimCodes Dec 19, 2020
34cc39d
The popup menu now remembers the last waifu that was set.
ZimCodes Dec 21, 2020
4e95d4d
Merge branch 'firefox'
ZimCodes Dec 21, 2020
04bc012
Makes popup menu smaller;
ZimCodes Dec 22, 2020
3eb781d
merge from firefox-alt
ZimCodes Dec 22, 2020
a60b94a
Update with latest changes; Adds rework from firefox-alt branch;
ZimCodes Dec 22, 2020
95a5a12
Removes extra themes;Removes image key from all theme json
ZimCodes Dec 23, 2020
057157a
Makes branch on par with master
ZimCodes Dec 23, 2020
c2280a9
Adds other Monika & Natsuki images;
ZimCodes Dec 24, 2020
0e16ac7
merge with doki-theme-chrome repo
ZimCodes Dec 24, 2020
87e1a51
Adds asynchronous programming to reduce load times;
ZimCodes Dec 26, 2020
b297fdf
Merge branch 'firefoxv3'
ZimCodes Dec 26, 2020
dfa9441
Adds high res icons
ZimCodes Dec 30, 2020
cad19bb
Merge branch 'firefoxv3'
ZimCodes Dec 30, 2020
7892086
merge with doki-theme-chrome/v7 branch
ZimCodes Dec 30, 2020
4102192
Update manifest to proper version formatting
ZimCodes Dec 30, 2020
cf0fab2
merge from master
ZimCodes Dec 30, 2020
080c192
Removes unneeded async keywords
ZimCodes Dec 30, 2020
2e1492a
Removes extra asyncs; Removes unnecessary theme_frames from new v7 th…
ZimCodes Dec 30, 2020
5598dad
update firefox build template by removing unnecessary theme_frame key
ZimCodes Dec 30, 2020
9df38b7
Removes theme_frame key from new themes;
ZimCodes Dec 30, 2020
eb608a7
When mix mode is activated all new tabs except the last are closed be…
ZimCodes Dec 31, 2020
a383b63
Merge branch 'firefoxv3'
ZimCodes Dec 31, 2020
b1c7875
Removes empty spaces from themes;
ZimCodes Dec 31, 2020
3bc2c54
Actually fix popup menu changing to the correct background color
ZimCodes Dec 31, 2020
d1fbfeb
Merge branch 'firefoxv3'
ZimCodes Dec 31, 2020
a56144e
Fixes the popup menu only changing colors on New Tab pages
ZimCodes Dec 31, 2020
c106b20
Merge branch 'firefoxv3'
ZimCodes Dec 31, 2020
4bf9ab9
merge with doki-theme-web master
ZimCodes Dec 31, 2020
0edb707
Merge branch 'master' of https://github.com/doki-theme/doki-theme-chrome
ZimCodes Dec 31, 2020
d32f534
Fixes popup menu color change for non-new tab pages
ZimCodes Dec 31, 2020
e9c34b3
Update versioning; Update Changelog
ZimCodes Dec 31, 2020
daf5f3f
Adds bounce animation to doki icon
ZimCodes Dec 31, 2020
df4befd
update Changelogs;Adds back .editorconfig file
ZimCodes Dec 31, 2020
fab9f87
actually adds .editorconfig file
ZimCodes Dec 31, 2020
1904f53
Adds hover animation to popup menu;Fixes popup menu color change when…
ZimCodes Dec 31, 2020
e9c2f99
Cleans up mix mode
ZimCodes Dec 31, 2020
c6be76e
Styling popup header font color.
Unthrottled Jan 1, 2021
e96cbf7
merge with doki-theme-web master branch
ZimCodes Apr 27, 2021
467a600
- Removes extra *Rias* folder.
ZimCodes Apr 27, 2021
2f8e7af
yarn.lock
ZimCodes Apr 27, 2021
f48c6f6
Brighten switch titles
ZimCodes Apr 27, 2021
94a3bd6
Update Changelog
ZimCodes Apr 27, 2021
6272ff7
Update manifest version to 9.0.1
ZimCodes Apr 27, 2021
249f5f2
Themed switch labels
ZimCodes Apr 28, 2021
b8b1020
Update Changelog
ZimCodes Apr 28, 2021
fe5d89a
Merge branch 'master' of https://github.com/doki-theme/doki-theme-web
ZimCodes Sep 2, 2021
fd647f6
Add option to activate/disable scrollbar & text selection themes;
ZimCodes Sep 2, 2021
a4769bd
Make doki theme's scrollbar & text selection styles have high priority;
ZimCodes Sep 2, 2021
26f9561
Change drop shadow of doki heartbeat to light gray;
ZimCodes Sep 3, 2021
e16b306
Clean up CONTRIBUTING file
ZimCodes Sep 3, 2021
a2862a5
Fixes URL match pattern
ZimCodes Sep 3, 2021
1149caf
Corrects issue number in CHANGELOG;
ZimCodes Sep 3, 2021
63fe908
Fixes Popup menu not changing to appropriate theme color when selected;
ZimCodes Sep 3, 2021
c55d0bb
Update CHANGELOG
ZimCodes Sep 3, 2021
b61488b
Fixes text selection and scrollbar not changing themes when selecting…
ZimCodes Sep 3, 2021
f16a96c
Fixes Random mode not enabling switches properly
ZimCodes Sep 3, 2021
a3dd290
Instead of dynamically adding style tag to the <head>, this uses CSS …
ZimCodes Sep 5, 2021
8aef98b
Removes toolbar_field_separator from firefox build template;
ZimCodes Sep 7, 2021
da862dd
Update CHANGELOG;
ZimCodes Sep 7, 2021
807fbb2
Possible solution to checkmark being out-of-bounds; Remove colons fro…
ZimCodes Sep 8, 2021
b739dc5
Merge branch 'master' of https://github.com/doki-theme/doki-theme-web
ZimCodes Sep 9, 2021
a936e13
Merge branch 'master' of https://github.com/doki-theme/doki-theme-web
ZimCodes Sep 26, 2021
2ae435a
Appropriate theme(favicon,json,action button,options page & image) fo…
ZimCodes Sep 29, 2021
66d63c6
Merge branch 'master' of https://github.com/doki-theme/doki-theme-web
ZimCodes Sep 29, 2021
b2d1032
Update Changlog and versionings
ZimCodes Sep 29, 2021
3446f78
Update changelog
ZimCodes Sep 29, 2021
f4339c1
Adds missing `loadTheme` import;
ZimCodes Oct 1, 2021
21cd068
Fix initialization, when user reopens browser;
ZimCodes Oct 6, 2021
feeb1f7
Error handling for undefined list during mix mode;
ZimCodes Oct 6, 2021
c173a6c
Rename `mixList` to `mixedList`;
ZimCodes Oct 6, 2021
5fbf2dd
Fix merge conflicts;
ZimCodes Oct 6, 2021
6ccd28b
Fixes search bar widget toggling in *Mixed Mode* reverting all tabs b…
ZimCodes Oct 6, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ Changelog
---

# Unreleased
# 15.0.1 [Firefox: theming bug fixes]
- Fix tabs not being randomized when creating tabs rapidly in mixed mode.
- Fixes text selection & scrollbar not loading appropriately with their individual tab in mixed mode.
- Fixes text selection & scrollbar not loading appropriately with their individual tab in mixed mode.
- Appropriate theme for *options page* for each tab loads correctly in mixed mode.
- Fixes initialization of mixed mode in new window, if the last option chosen was mixed mode.
- Mitigates favicon & other theming components to stay themed in mixed mode.

# 15.0.0 [Only for Onii-chan]

Expand Down
2 changes: 1 addition & 1 deletion firefoxThemes/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Doki Theme for Firefox",
"short_name": "Doki Theme",
"version": "15.0.0",
"version": "15.0.1",
"description": "A theme collection of girls from various anime, manga, and visual novels series.",
"manifest_version": 2,
"icons": {
Expand Down
47 changes: 26 additions & 21 deletions firefoxThemes/modules/modes/mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,15 @@ function keepLastTab(tabs) {
}
return lastTabs;
}

/*Remove themes that did not make it to the mixedTab list.
* This is primarily used to mitigate speedy tab creations*/
async function purgeGlitchedTabs(newTab){
const {mixedTabs} = await browser.storage.local.get(["mixedTabs"]);
const tabs = await browser.tabs.query({});
const glitchyTabs = tabs.filter(tab => !(!!mixedTabs.get(tab.id)) && tab.id !== newTab.id);
const glitchyTabIDs = glitchyTabs.map(tab => tab.id);
browser.tabs.remove(glitchyTabIDs);
}
/*EVENT: When a new tab is created add a random theme to it*/
function MixTabCreated(tab) {
if (tab.title === "New Tab") {
Expand All @@ -50,38 +58,33 @@ function MixTabCreated(tab) {

/*EVENT: Set the theme for the current active tab*/
function MixTabActivated(activeInfo) {
browser.storage.local.get(["waifuThemes", "mixedTabs"])
browser.storage.local.get(["waifuThemes"])
.then((storage) => {
const currentThemeId = storage.mixedTabs.get(activeInfo.tabId);
const currentThemeId = mixList.get(activeInfo.tabId);
if (currentThemeId) {
loadTheme(storage.waifuThemes.themes, currentThemeId);
browser.storage.local.set({currentThemeId});
}
});
}

//Maintain a local list of all mixed tabs
let mixList = new Map();
/*EVENT: When a tab is closed delete the saved data for it*/
function MixTabClosed(tabId) {
browser.storage.local.get()
.then((storage) => {
storage.mixedTabs.delete(tabId);
browser.storage.local.set({mixedTabs: storage.mixedTabs});
});
mixList.delete(tabId);
browser.storage.local.set({mixedTabs: mixList});
}

/*Updates the new tab with a new waifu theme*/
function MixedUpdate(tab, themeId, themes) {
browser.storage.local.get(["mixedTabs"])
.then((storage) => {
storage.mixedTabs.set(tab.id, themeId);//Adds the created tab to the list of mixed tabs
browser.storage.local.set({currentThemeId: themeId, mixedTabs: storage.mixedTabs});
//Update the tab with theme
browser.tabs.update(tab.id, {
loadReplace: true,
url: themes[themeId].page
});
//Load browser theme
loadTheme(themes, themeId);
});
mixList.set(tab.id, themeId);//Adds the created tab to the list of mixed tabs
browser.storage.local.set({currentThemeId: themeId, mixedTabs: mixList});
//Load browser theme
loadTheme(themes, themeId);
//Purge glitchy tabs
setTimeout(()=>{
purgeGlitchedTabs(tab);
},3000);
}

/*Cleans up all things relating to the Mixed tab option*/
Expand All @@ -108,6 +111,7 @@ function setupMixedUpdate(msg) {
.then((storage) => {
if (!storage.mixedTabs) {
storage.mixedTabs = new Map();//Create a new mixed tab list
mixList = new Map();
}
//Activate event listeners
browser.tabs.onCreated.addListener(MixTabCreated);//When a tab is created
Expand All @@ -130,6 +134,7 @@ function setupMixedUpdate(msg) {
} else {
browser.storage.local.set({currentThemeId, mixedTabs: storage.mixedTabs});
}
mixList = storage.mixedTabs;
//Initialize first (and only) new tab with the default theme
loadTheme(themes, currentThemeId);
}
Expand Down
18 changes: 17 additions & 1 deletion firefoxThemes/modules/utils/themes/browser.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {themeExtensionIconInToolBar} from "./logo.js";
import {getRandomThemeId} from "../random.js";


/*Set the browser theme for chosen waifu*/
Expand All @@ -10,5 +11,20 @@ async function loadTheme(themes, themeId) {
const themeJSON = await res.json();
browser.theme.update(themeJSON);
}
/*Retrieve the appropriate theme*/
async function getCurrentTheme(themes,themeId,mixedTabs){
console.group("Page");
if(mixedTabs){
const tab = await browser.tabs.getCurrent();
themeId = mixedTabs.get(tab.id);
if(!themeId){
themeId = getRandomThemeId(themes);
mixedTabs.set(tab.id,themeId);
browser.storage.local.set({mixedTabs});
loadTheme(themes,themeId);
}
}
return themes[themeId];
}

export {loadTheme};
export {loadTheme,getCurrentTheme};
19 changes: 11 additions & 8 deletions firefoxThemes/options/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ function setCss(chosenTheme) {
root.style.setProperty('--checkmark-color',colors.classNameColor);
}

function initContent() {
browser.storage.local.get(['loadOnStart', 'textSelection', 'scrollbar', 'waifuThemes', 'currentThemeId'])
.then((storage) => {
initCheckbox(loadOnStartCheckbox,!!storage.loadOnStart);
initCheckbox(textSelectionCheckbox,!!storage.textSelection);
initCheckbox(scrollbarCheckbox,!!storage.scrollbar);
setCss(storage.waifuThemes.themes[storage.currentThemeId])
});
async function initContent() {
const storage = await browser.storage.local.get(['loadOnStart', 'textSelection', 'scrollbar', 'waifuThemes', 'currentThemeId','mixedTabs'])
initCheckbox(loadOnStartCheckbox,!!storage.loadOnStart);
initCheckbox(textSelectionCheckbox,!!storage.textSelection);
initCheckbox(scrollbarCheckbox,!!storage.scrollbar);
let themeId = storage.currentThemeId;
if(storage.mixedTabs){
const tab = await browser.tabs.getCurrent();
themeId = storage.mixedTabs.get(tab.id);
}
setCss(storage.waifuThemes.themes[themeId]);
}

const onChangeCheckEvents = async (e) => {
Expand Down
2 changes: 1 addition & 1 deletion firefoxThemes/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "doki-theme-firefox",
"version": "15.0.0",
"version": "15.0.1",
"description": "A theme collection of girls from various anime, manga, and visual novels series.",
"main": "index.js",
"repository": "https://github.com/doki-theme/doki-theme-web",
Expand Down
41 changes: 21 additions & 20 deletions firefoxThemes/resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,27 @@ class Theme {
}

/*Initialize Local Storage & custom new tab page*/
function startStorage() {
browser.storage.local.get(["currentThemeId", "loadOnStart", "textSelection", "scrollbar"])
.then((storage) => {
const initStorage = {
waifuThemes: new WaifuThemes(),
};
//Retrieve all themes if none exists in local storage
browser.storage.local.set(initStorage);
//Load browser theme
if (storage.currentThemeId) {
loadTheme(initStorage.waifuThemes.themes, storage.currentThemeId);
}
if (storage.loadOnStart) {
//When the browser first opens, redirect to custom new tab page
browser.tabs.update({loadReplace: true, url: "waifus/index.html"});
}
// Register all styles from option page
updateOptions({optionName: "textSelection", optionValue: !!!storage.textSelection});
updateOptions({optionName: "scrollbar", optionValue: !!!storage.scrollbar});
});
async function startStorage() {
const storage = await browser.storage.local.get(["currentThemeId", "loadOnStart", "textSelection", "scrollbar","mixedTabs"]);
const initStorage = {
waifuThemes: new WaifuThemes(),
};
//Retrieve all themes if none exists in local storage
browser.storage.local.set(initStorage);
//Load browser theme
if (storage.mixedTabs){
const tab = await browser.tabs.getCurrent();
loadTheme(initStorage.waifuThemes.themes, storage.mixedTabs.get(tab.id));
}else if (storage.currentThemeId) {
loadTheme(initStorage.waifuThemes.themes, storage.currentThemeId);
}
if (storage.loadOnStart) {
//When the browser first opens, redirect to custom new tab page
browser.tabs.update({loadReplace: true, url: "waifus/index.html"});
}
// Register all styles from option page
updateOptions({optionName: "textSelection", optionValue: !!!storage.textSelection});
updateOptions({optionName: "scrollbar", optionValue: !!!storage.scrollbar});
}

/*Update all new tabs with new waifu theme*/
Expand Down
25 changes: 0 additions & 25 deletions firefoxThemes/waifus/faviconLoader.js

This file was deleted.

6 changes: 1 addition & 5 deletions firefoxThemes/waifus/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
<link href="doki.png" rel="icon" type="image/png">
<!--Styles for new tab page-->
<link href="tab.css" rel="stylesheet">
<!--Search Capabilities-->
<script type="module" src="tab.js" defer></script>
<!--Adds/Removes Waifu-->
<script src="waifu.js" defer></script>
<!--Load Themed Favicon-->
<script type="module" src="faviconLoader.js" defer></script>
<script type="module" src="themeLoader.js" async></script>
</head>
<body>
</body>
Expand Down
40 changes: 18 additions & 22 deletions firefoxThemes/waifus/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,30 +69,26 @@ function displayWidget() {
`;
}

function applyTabListeners() {
browser.storage.local.get(["showWidget", "waifuThemes", "currentThemeId"])
.then((storage) => {
const currentTheme = storage.waifuThemes.themes[storage.currentThemeId] ||
storage.waifuThemes.themes["19b65ec8-133c-4655-a77b-13623d8e97d3"]; // Ryuko Dark
const root = document.querySelector(':root');
root.style.setProperty('--accent-color', currentTheme.definition.colors.accentColor);
root.style.setProperty('--base-background-color', currentTheme.definition.colors.baseBackground);
function applyTabListeners(storage) {
const currentTheme = storage.currentTheme;
const root = document.querySelector(':root');
root.style.setProperty('--accent-color', currentTheme.definition.colors.accentColor);
root.style.setProperty('--base-background-color', currentTheme.definition.colors.baseBackground);

if (storage.showWidget === undefined || storage.showWidget) {
displayWidget();
// set themed icons
setThemedSearchInputIcon(currentTheme);
setThemedAboutIcon(currentTheme);
if (storage.showWidget === undefined || storage.showWidget) {
displayWidget();
// set themed icons
setThemedSearchInputIcon(currentTheme);
setThemedAboutIcon(currentTheme);

/*---Event Listeners---*/
const input = document.querySelector("input[type='search']");
input.addEventListener("input", searchQuery, true);
input.addEventListener("keydown", keyConfirm, true);
/*---Event Listeners---*/
const input = document.querySelector("input[type='search']");
input.addEventListener("input", searchQuery, true);
input.addEventListener("keydown", keyConfirm, true);

const searchButton = document.querySelector(".search-button");
searchButton.addEventListener("click", confirmSearch, false);
}
});
const searchButton = document.querySelector(".search-button");
searchButton.addEventListener("click", confirmSearch, false);
}
}

applyTabListeners();
export {applyTabListeners};
40 changes: 40 additions & 0 deletions firefoxThemes/waifus/themeLoader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import {buildSVG, svgToPng} from "../modules/utils/themes/logo.js";
import {getCurrentTheme} from "../modules/utils/themes/browser.js";
import {applyTheme} from "./waifu.js";
import {applyTabListeners} from "./tab.js";

function setThemedFavicon(currentTheme) {
const faviconOptions = {width: 32, height: 32};
const faviconSVG = buildSVG(currentTheme, faviconOptions);
svgToPng(faviconSVG, faviconOptions, (imgData) => {
let link = document.querySelector("link[rel~='icon']");
if (!link) {
link = document.createElement('link');
link.rel = 'icon';
document.head.appendChild(link);
}
link.href = imgData;
});
}

async function startTheming() {
const storage = await browser.storage.local.get(["currentThemeId","waifuThemes","mixedTabs","backgroundType","showWidget"]);
storage.currentTheme = await getCurrentTheme(storage.waifuThemes.themes,storage.currentThemeId,storage.mixedTabs);
applyTheme(storage);
applyTabListeners(storage);
setThemedFavicon(storage.currentTheme);
if(storage.mixedTabs){
//Makes sure the mixedTab list has the same amount of tabs as the amount currently opened tabs
const tabs = await browser.tabs.query({});
const tabIDs = tabs.map(tab=>tab.id);

for(const key of storage.mixedTabs.keys()){
if(!tabIDs.includes(key)){
storage.mixedTabs.delete(key);
}
}
browser.storage.local.set({mixedTabs:storage.mixedTabs});
}
}

startTheming();
17 changes: 6 additions & 11 deletions firefoxThemes/waifus/waifu.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ function getSecondaryAnchoring(theme) {

/*Prepares the Waifu to be displayed on webpage*/
function getWaifu(storage) {
const themes = storage.waifuThemes.themes;
//Retrieve path to the image file
const currentTheme = themes[storage.currentThemeId];
const currentTheme = storage.currentTheme;

const primaryBackgroundRelativeUrl = currentTheme.backgrounds.primary;
const isPrimaryBackground = !storage.backgroundType;
Expand Down Expand Up @@ -54,13 +53,9 @@ function loadDokiTheme(storage) {
}

/*Apply Theme */
function applyTheme() {
browser.storage.local.get(["waifuThemes", "currentThemeId", "backgroundType"])
.then((storage) => {
if (Object.keys(storage.waifuThemes.themes).includes(storage.currentThemeId)) {
loadDokiTheme(storage);
}
});
function applyTheme(storage) {
if (Object.keys(storage.waifuThemes.themes).includes(storage.currentThemeId)) {
loadDokiTheme(storage);
}
}

applyTheme();
export {applyTheme};