fix css_classes usage
This commit is contained in:
parent
243f2b5457
commit
8f34654929
@ -1,9 +1,6 @@
|
|||||||
const CONFIG_KEY = "rscord_config";
|
const CONFIG_KEY = "rscord_config";
|
||||||
const DEFAULT_CONFIG = { customCss: "", revertStatusIcons: false };
|
const DEFAULT_CONFIG = { customCss: "", revertStatusIcons: false };
|
||||||
|
|
||||||
window.AUTH_TOKEN = null;
|
|
||||||
window.localStorage_ = localStorage;
|
|
||||||
|
|
||||||
function urlBase64ToUint8Array(base64String) {
|
function urlBase64ToUint8Array(base64String) {
|
||||||
const padding = "=".repeat((4 - (base64String.length % 4)) % 4);
|
const padding = "=".repeat((4 - (base64String.length % 4)) % 4);
|
||||||
const base64 = (base64String + padding)
|
const base64 = (base64String + padding)
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
(function () {
|
(function () {
|
||||||
|
const { CSS_CLASSES, GLOBAL_ENV } = window;
|
||||||
|
|
||||||
const BUTTON_ID = "rscord-settings-btn";
|
const BUTTON_ID = "rscord-settings-btn";
|
||||||
const CONTENT_CONTAINER_ID = "custom-content";
|
const CONTENT_CONTAINER_ID = "custom-content";
|
||||||
const SWITCH_CONTAINER_ID = "switch-container";
|
const SWITCH_CONTAINER_ID = "switch-container";
|
||||||
@ -79,7 +81,7 @@
|
|||||||
"push-notifications",
|
"push-notifications",
|
||||||
pushRegistered,
|
pushRegistered,
|
||||||
async (checked) => {
|
async (checked) => {
|
||||||
const publicKey = window.GLOBAL_ENV.VAPID_KEY;
|
const publicKey = GLOBAL_ENV.VAPID_KEY;
|
||||||
if (!publicKey) return false;
|
if (!publicKey) return false;
|
||||||
try {
|
try {
|
||||||
await (checked ? registerPush(publicKey) : unregisterPush());
|
await (checked ? registerPush(publicKey) : unregisterPush());
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
const { CSS_CLASSES } = window;
|
||||||
|
|
||||||
const ICON_PATHS = {
|
const ICON_PATHS = {
|
||||||
checked: [
|
checked: [
|
||||||
"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z",
|
"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z",
|
||||||
|
|||||||
@ -34,6 +34,9 @@
|
|||||||
window.__OVERLAY__ = /overlay/.test(location.pathname)
|
window.__OVERLAY__ = /overlay/.test(location.pathname)
|
||||||
window.__BILLING_STANDALONE__ = /^\/billing/.test(location.pathname)
|
window.__BILLING_STANDALONE__ = /^\/billing/.test(location.pathname)
|
||||||
|
|
||||||
|
window.AUTH_TOKEN = null;
|
||||||
|
window.localStorage_ = localStorage;
|
||||||
|
|
||||||
function protocolRelative(url) {
|
function protocolRelative(url) {
|
||||||
if (!url) return "";
|
if (!url) return "";
|
||||||
return "//" + url.replace(/^https?:\/\//, "").replace(/\/$/, "");
|
return "//" + url.replace(/^https?:\/\//, "").replace(/\/$/, "");
|
||||||
|
|||||||
Reference in New Issue
Block a user