mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-12-01 02:17:53 +01:00
Fix: do not open changelog if not needed
This commit is contained in:
1 parent
2e6ed5298b
commit
7d742a7ea6
1 file changed
+13
-3
@@ -74,9 +74,19 @@ api.runtime.onMessage.addListener((request, sender, sendResponse) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
api.runtime.onInstalled.addListener(() => {
|
api.runtime.onInstalled.addListener((details) => {
|
||||||
api.tabs.create({url: api.runtime.getURL("/changelog/3/changelog_3.0.html")});
|
if (
|
||||||
})
|
// No need to show changelog if its was a browser update (and not extension update)
|
||||||
|
details.reason === "browser_update" ||
|
||||||
|
// No need to show changelog if developer just reloaded the extension
|
||||||
|
(details.reason === "update" &&
|
||||||
|
details.previousVersion === chrome.runtime.getManifest().version)
|
||||||
|
)
|
||||||
|
return;
|
||||||
|
api.tabs.create({
|
||||||
|
url: api.runtime.getURL("/changelog/3/changelog_3.0.html"),
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
async function sendVote(videoId, vote) {
|
async function sendVote(videoId, vote) {
|
||||||
api.storage.sync.get(null, async (storageResult) => {
|
api.storage.sync.get(null, async (storageResult) => {
|
||||||
|
|||||||
Reference in new issue
Block a user