Organized all the code

Updated the update notification to check periodically every 5 minutes
Added in headless browser support for extensions (check the extensions repo to see an example)
Added in DiscordRPC support
This commit is contained in:
2025-11-19 16:28:33 -05:00
parent 2f556c2ddc
commit 5f3020ca6e
24 changed files with 1077 additions and 815 deletions

26
src/utils/dom-loader.js Normal file
View File

@@ -0,0 +1,26 @@
export function getDomElements() {
return {
browseButton: document.getElementById('browse-button'),
favoritesButton: document.getElementById('favorites-button'),
settingsButton: document.getElementById('settings-button'),
browsePage: document.getElementById('browse-page'),
pageTitle: document.getElementById('page-title'),
headerContext: document.getElementById('header-context'),
searchIconButton: document.getElementById('search-icon-button'),
searchModal: document.getElementById('search-modal'),
searchCloseButton: document.getElementById('search-close-button'),
searchInput: document.getElementById('search-input'),
searchButton: document.getElementById('search-button'),
sourceList: document.getElementById('source-list'),
contentGallery: document.getElementById('content-gallery'),
favoritesGallery: document.getElementById('favorites-gallery'),
loadingSpinner: document.getElementById('loading-spinner'),
infiniteLoadingSpinner: document.getElementById('infinite-loading-spinner'),
messageBar: document.getElementById('message-bar'),
galleryPlaceholder: document.getElementById('gallery-placeholder'),
layoutRadios: document.querySelectorAll('input[name="layout"]'),
tagInfoModal: document.getElementById('tag-info-modal'),
tagInfoCloseButton: document.getElementById('tag-info-close-button'),
tagInfoContent: document.getElementById('tag-info-content'),
};
}