diff --git a/css/dark.css b/css/dark.css index 01dafd6..689d056 100644 --- a/css/dark.css +++ b/css/dark.css @@ -316,10 +316,13 @@ a.text-dark:hover, /* background-color: #2e2e2e */ #widget_wrapper_150, #widget_wrapper_153, -.info_bar { +.info_bar{ background-color: var(--widget-bg) !important; } +.card { + background-color: var(--widget-bg); +} /* nm messages */ .conversation-item.item-right .conversation-body { float: right; diff --git a/css/fixes.css b/css/fixes.css index 065e6e9..22c31fa 100644 --- a/css/fixes.css +++ b/css/fixes.css @@ -46,11 +46,13 @@ html, max-height: 85% !important; border-radius: 10px !important; } + .nm-left { - width: 21% !important; + width: 15% !important; } + .nm-right { - width: 79% !important; + width: 85% !important; } @media (max-width: 520px) { diff --git a/js/main.js b/js/main.js index 8128ba3..51e7b61 100644 --- a/js/main.js +++ b/js/main.js @@ -3,17 +3,6 @@ if (typeof browser === "undefined") { var browser = chrome; } -// Get User id -function getUserId() { - try { - return document - .getElementsByClassName("nav-item profile")[0] - .firstElementChild.href.split("/")[4]; - } catch { - return null; - } -} - // Cookie functions function setCookie(name, value, days) { var expires; @@ -78,6 +67,8 @@ async function insert() { document.querySelector(".py-2").appendChild(thswitch); } catch {} try { + // Check if the user is logged in + // If not, reset theme cookie var isLogged = isLoggedIn(); if (!isLogged) { var expTheme = getCookie("expirationTheme"); @@ -96,17 +87,20 @@ async function insert() { setCookie("themeid", themeid, 364); } } catch {} + try { + // Replace logo with high quality one + document.getElementsByClassName("d-sm-none")[0].src = "/upload/000/u1/e/8/e83ef3bf.png"; + } catch {} try { // Check if a newer version is available if (currVer < (await latest())) { credText += `%20(${browser.i18n.getMessage("creditImg")})`; } - } catch {} - creditImg.src = `https://img.shields.io/badge/Spectrum%20v${credText}-4d4d4d?logo=github`; - - // Append credit - credit.append(creditImg); + creditImg.src = `https://img.shields.io/badge/Spectrum%20v${credText}-4d4d4d?logo=github`; + // Append credit + credit.append(creditImg); + } catch {} try { document .getElementsByClassName( diff --git a/manifest.json b/manifest.json index ecb7e29..9fb3fa0 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "Spectrum", - "version": "1.4.9", + "version": "1.5.0", "description": "__MSG_extDesc__", "default_locale": "en", "icons": {