mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-17 23:08:33 +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:
@@ -6,7 +6,7 @@ document.addEventListener("click", (e) => {
|
||||
|
||||
if (e.target.id === "window-update-size_768") {
|
||||
getCurrentWindow().then((currentWindow) => {
|
||||
var updateInfo = {
|
||||
let updateInfo = {
|
||||
width: 768,
|
||||
height: 1024
|
||||
};
|
||||
@@ -17,7 +17,7 @@ document.addEventListener("click", (e) => {
|
||||
|
||||
if (e.target.id === "window-update-minimize") {
|
||||
getCurrentWindow().then((currentWindow) => {
|
||||
var updateInfo = {
|
||||
let updateInfo = {
|
||||
state: "minimized"
|
||||
};
|
||||
|
||||
@@ -80,13 +80,13 @@ document.addEventListener("click", (e) => {
|
||||
}
|
||||
|
||||
else if (e.target.id === "window-resize-all") {
|
||||
var gettingAll = browser.windows.getAll();
|
||||
let gettingAll = browser.windows.getAll();
|
||||
gettingAll.then((windows) => {
|
||||
var updateInfo = {
|
||||
let updateInfo = {
|
||||
width: 1024,
|
||||
height: 768
|
||||
};
|
||||
for (var item of windows) {
|
||||
for (let item of windows) {
|
||||
browser.windows.update(item.id, updateInfo);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user