Skip to content

Commit 82bfa5b

Browse files
committed
Changes
1 parent 171f041 commit 82bfa5b

File tree

2 files changed

+24
-22
lines changed

2 files changed

+24
-22
lines changed

changelog/changes.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
{
22
"NOTE": "THERE IS NO NEED TO UPDATE THIS YOURSELF, IT WILL BE UPDATED WHEN RELEASED.",
3-
"version": "2.30.1",
4-
"enhanced": [
5-
"Inject styles faster.",
6-
"Traps API.",
7-
"waitForElement API.",
8-
"Append style elements to new place.",
9-
"Make unlisted button better match new colors."
10-
],
11-
"fixed": ["Fix line breaks for most popular project."]
3+
"version": "3.0.0",
4+
"enhanced": [],
5+
"fixed": []
126
}

extras/background.js

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,15 @@ chrome.runtime.onInstalled.addListener(async function (object) {
8080
version: version,
8181
});
8282
if (storedVersion && storedVersion !== version) {
83-
await chrome.tabs.create({
84-
url: "/changelog/index.html",
85-
});
83+
if (version === "3.0.0") {
84+
await chrome.tabs.create({
85+
url: "/changelog/3/index.html",
86+
});
87+
} else {
88+
await chrome.tabs.create({
89+
url: "/changelog/index.html",
90+
});
91+
}
8692
}
8793
}
8894
if (
@@ -150,13 +156,15 @@ chrome.storage.onChanged.addListener(async function (changes, namespace) {
150156
chrome.runtime.sendMessage({
151157
msg: "installedThemesUpdate",
152158
value: newValue,
153-
})
159+
});
154160
}
155-
if (oldValue.find((el) => el.active) !== newValue.find((el) => el.active)) {
161+
if (
162+
oldValue.find((el) => el.active) !== newValue.find((el) => el.active)
163+
) {
156164
chrome.runtime.sendMessage({
157165
msg: "themeUpdate",
158166
value: newValue.find((el) => el.active),
159-
})
167+
});
160168
}
161169
}
162170
}
@@ -602,15 +610,15 @@ chrome.runtime.onMessageExternal.addListener(async function (
602610
) {
603611
if (msg.msg === "openSupportChat") {
604612
await chrome.tabs.create({
605-
url: "/extras/support/chat/index.html?code="+msg.code
606-
})
607-
chrome.tabs.remove(sender.tab.id, function() { });
613+
url: "/extras/support/chat/index.html?code=" + msg.code,
614+
});
615+
chrome.tabs.remove(sender.tab.id, function () {});
608616
}
609617
if (msg.msg === "openFeedbackPage") {
610618
await chrome.tabs.create({
611-
url: "/extras/feedback/index.html?code="+msg.code
612-
})
613-
chrome.tabs.remove(sender.tab.id, function() { });
619+
url: "/extras/feedback/index.html?code=" + msg.code,
620+
});
621+
chrome.tabs.remove(sender.tab.id, function () {});
614622
}
615623
if (msg === "openSettings") {
616624
await chrome.tabs.create({
@@ -668,7 +676,7 @@ chrome.runtime.onMessage.addListener(async function (
668676
if (msg.msg === "openSupportAuth") {
669677
chrome.tabs.create({
670678
url: "https://scratch.mit.edu/scratchtools/support/auth/",
671-
})
679+
});
672680
}
673681
if (msg.action === "getStyles") {
674682
sendResponse({ data: cachedStyles });

0 commit comments

Comments
 (0)