mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-11-24 07:13:02 +01:00
Update ryd.background.js
1. Race condition between two async calls 2. We don't need to rewrite the variable every time a page is open. https://github.com/Anarios/return-youtube-dislike/pull/537#discussion_r855432386
This commit is contained in:
1 file changed
+3
-3
@@ -74,12 +74,12 @@ api.runtime.onMessage.addListener((request, sender, sendResponse) => {
|
||||
}
|
||||
});
|
||||
|
||||
api.storage.sync.get(['newInstallation'], (result) => {
|
||||
if (result.newInstallation !== false) {
|
||||
api.storage.sync.get(['showChangelog'], (details) => {
|
||||
if (details.showChangelog !== false) {
|
||||
api.tabs.create({url: api.runtime.getURL("/changelog/3/changelog_3.0.html")});
|
||||
api.storage.sync.set({'showChangelog': false});
|
||||
}
|
||||
});
|
||||
api.storage.sync.set({'newInstallation': false});
|
||||
|
||||
async function sendVote(videoId, vote) {
|
||||
api.storage.sync.get(null, async (storageResult) => {
|
||||
|
||||
Reference in new issue
Block a user