cherry pick #541

clean up unnecessary commented code

Show changelog only on installation

fixes #534

add changelog button in popup
This commit is contained in:
sy-b authored and Yvon Cui committed 2022-04-19 00:07:16 -05:00
1 parent 2e6ed5298b
commit a99410ae13
3 files changed
+12 -9

No files matched your search

+5 -5
View File
@@ -30,11 +30,7 @@
<button id="link_website" title="__MSG_linkWebsite__">
__MSG_linkWebsite__
</button>
<button
style="margin-top: 0.3em; background: #ff0000"
id="link_donate"
title="__MSG_linkDonate__"
>
<button style="margin-top: 0.3em; background: #ff0000" id="link_donate" title="__MSG_linkDonate__">
__MSG_linkDonate__
</button>
<button id="link_discord">Discord</button>
@@ -46,6 +42,10 @@
<button style="margin-top: 0.3em" id="link_help" title="__MSG_linkHelp__">
__MSG_linkHelp__
</button>
<br>
<button style="margin-top: 0.3em" id="link_changelog" title="__MSG_linkChangelog__">
Change Log
</button>
<br/>
<br/>
+2
View File
@@ -19,6 +19,7 @@ const config = {
donate: "https://returnyoutubedislike.com/donate",
faq: "https://returnyoutubedislike.com/faq",
help: "https://returnyoutubedislike.com/help",
changelog: "/changelog/3/changelog_3.0.html"
},
};
@@ -49,6 +50,7 @@ createLink(config.links.discord, "link_discord");
createLink(config.links.faq, "link_faq");
createLink(config.links.donate, "link_donate");
createLink(config.links.help, "link_help");
createLink(config.links.changelog, "link_changelog");
function createLink(url, id) {
document.getElementById(id).addEventListener("click", () => {
+5 -4
View File
@@ -9,8 +9,6 @@ let extConfig = {
coloredThumbs: false,
coloredBar: false,
colorTheme: "classic", // classic, accessible, neon
// coloredThumbs: false,
// coloredBar: false,
numberDisplayFormat: "compactShort", // compactShort, compactLong, standard
numberDisplayRoundDown: true, // locale 'de' shows exact numbers by default
};
@@ -74,9 +72,12 @@ api.runtime.onMessage.addListener((request, sender, sendResponse) => {
}
});
api.runtime.onInstalled.addListener(() => {
api.storage.sync.get(['newInstallation'], (result) => {
if (result.newInstallation !== false) {
api.tabs.create({url: api.runtime.getURL("/changelog/3/changelog_3.0.html")});
})
}
});
api.storage.sync.set({'newInstallation': false});
async function sendVote(videoId, vote) {
api.storage.sync.get(null, async (storageResult) => {