fix css_classes usage

This commit is contained in:
murdle 2025-12-20 23:41:21 +02:00
parent 243f2b5457
commit 8f34654929
4 changed files with 8 additions and 4 deletions

View File

@ -1,9 +1,6 @@
const CONFIG_KEY = "rscord_config";
const DEFAULT_CONFIG = { customCss: "", revertStatusIcons: false };
window.AUTH_TOKEN = null;
window.localStorage_ = localStorage;
function urlBase64ToUint8Array(base64String) {
const padding = "=".repeat((4 - (base64String.length % 4)) % 4);
const base64 = (base64String + padding)

View File

@ -1,4 +1,6 @@
(function () {
const { CSS_CLASSES, GLOBAL_ENV } = window;
const BUTTON_ID = "rscord-settings-btn";
const CONTENT_CONTAINER_ID = "custom-content";
const SWITCH_CONTAINER_ID = "switch-container";
@ -79,7 +81,7 @@
"push-notifications",
pushRegistered,
async (checked) => {
const publicKey = window.GLOBAL_ENV.VAPID_KEY;
const publicKey = GLOBAL_ENV.VAPID_KEY;
if (!publicKey) return false;
try {
await (checked ? registerPush(publicKey) : unregisterPush());

View File

@ -1,3 +1,5 @@
const { CSS_CLASSES } = window;
const ICON_PATHS = {
checked: [
"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z",

View File

@ -33,6 +33,9 @@
window.GLOBAL_ENV = {};
window.__OVERLAY__ = /overlay/.test(location.pathname)
window.__BILLING_STANDALONE__ = /^\/billing/.test(location.pathname)
window.AUTH_TOKEN = null;
window.localStorage_ = localStorage;
function protocolRelative(url) {
if (!url) return "";