mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[FIX] isort, prettier, black: JS lint in all affect modules
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user