provide tracking for the window
Might be useful when opening a built-in page.
This commit is contained in:
parent
12f9562aa6
commit
eaaeba79b1
1 changed files with 11 additions and 1 deletions
|
@ -10,7 +10,7 @@ export default class windowman {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prepare the window with its metadata.
|
// Prepare the window with its metadata.
|
||||||
constructor() {
|
constructor(OPTIONS = {}) {
|
||||||
function headers() {
|
function headers() {
|
||||||
let LOAD_STATE = true;
|
let LOAD_STATE = true;
|
||||||
let UI = {
|
let UI = {
|
||||||
|
@ -244,11 +244,21 @@ export default class windowman {
|
||||||
actions();
|
actions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
((OPTIONS != null && (typeof OPTIONS).includes(`obj`) && !Array.isArray(OPTIONS)) ? OPTIONS[`monitor`] : true) ? this.monitor() : null;
|
||||||
|
|
||||||
headers();
|
headers();
|
||||||
appearance();
|
appearance();
|
||||||
events();
|
events();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Send monitoring events, useful to determining whether the window is opened or closed.
|
||||||
|
|
||||||
|
@param {string} MESSAGE_NAME Custom message name
|
||||||
|
*/
|
||||||
|
monitor() {
|
||||||
|
chrome.runtime.connect({name: `view=${window.location.href}`});
|
||||||
|
};
|
||||||
|
|
||||||
/* Run this function if you would like to synchronize with data. */
|
/* Run this function if you would like to synchronize with data. */
|
||||||
async sync() {
|
async sync() {
|
||||||
// Import the module.
|
// Import the module.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue