mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-16 06:18:35 +02:00
Replace var with let in examples (#484)
* Replace var with let in examples store-collected-images/webextension-plain/deps/uuidv4.js * Reverted third–party code
This commit is contained in:
@@ -21,7 +21,7 @@ function toggleCSS(tab) {
|
||||
}
|
||||
}
|
||||
|
||||
var gettingTitle = browser.pageAction.getTitle({tabId: tab.id});
|
||||
let gettingTitle = browser.pageAction.getTitle({tabId: tab.id});
|
||||
gettingTitle.then(gotTitle);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ function initializePageAction(tab) {
|
||||
/*
|
||||
When first loaded, initialize the page action for all tabs.
|
||||
*/
|
||||
var gettingAllTabs = browser.tabs.query({});
|
||||
let gettingAllTabs = browser.tabs.query({});
|
||||
gettingAllTabs.then((tabs) => {
|
||||
for (let tab of tabs) {
|
||||
initializePageAction(tab);
|
||||
|
||||
Reference in New Issue
Block a user