[FIX] isort, prettier, black: JS lint in all affect modules

This commit is contained in:
KKamaa
2022-03-28 03:43:11 +03:00
parent 872ae6cb09
commit 9bd63dd24a
14 changed files with 116 additions and 81 deletions

View File

@@ -1,8 +1,8 @@
// Show a big banner in the top of the page if the context has been
// Changed in another tab or window (in the same browser)
var con = [];
var lastCtx = null;
window.con = [];
window.lastCtx = null;
addEventListener(
"connect",
@@ -10,21 +10,21 @@ addEventListener(
"use strict";
var port = ee.ports[0];
con.push(port);
window.con.push(port);
port.onmessage = function (e) {
var newCtx = e.data;
if (lastCtx && newCtx !== lastCtx) {
con.forEach(function (eport) {
if (window.lastCtx && newCtx !== window.lastCtx) {
window.con.forEach(function (eport) {
eport.postMessage({
type: "newCtx",
newCtx: newCtx,
lastCtx: lastCtx,
lastCtx: window.lastCtx,
});
});
}
lastCtx = newCtx;
window.lastCtx = newCtx;
};
},
false