mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-17 14:59:12 +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:
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
var popupParameters;
|
||||
let popupParameters;
|
||||
|
||||
browser.menus.create({
|
||||
id: "remove_element",
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
});
|
||||
|
||||
|
||||
var highlightedBox;
|
||||
let highlightedBox;
|
||||
function highlightElement(element) {
|
||||
removeHighlights();
|
||||
let boundingRect = element.getBoundingClientRect();
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
// if the given first parameter matches the info.targetElementId integer from
|
||||
// the menus.onClicked or menus.onShown events.
|
||||
if (!browser.menus || !browser.menus.getTargetElement) {
|
||||
var menuTarget = null;
|
||||
let menuTarget = null;
|
||||
let cleanupIfNeeded = () => {
|
||||
if (menuTarget && !document.contains(menuTarget)) menuTarget = null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user