Skip to content

Commit

Permalink
Update 1.5.0
Browse files Browse the repository at this point in the history
Changed messenger width
Changed the logo to a high quality one on mobile
  • Loading branch information
Alextimka committed Sep 24, 2024
1 parent 348c3cf commit 4fd5241
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 20 deletions.
5 changes: 4 additions & 1 deletion css/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 4 additions & 2 deletions css/fixes.css
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
26 changes: 10 additions & 16 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand All @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "Spectrum",
"version": "1.4.9",
"version": "1.5.0",
"description": "__MSG_extDesc__",
"default_locale": "en",
"icons": {
Expand Down

0 comments on commit 4fd5241

Please sign in to comment.