window

The global window object.

Show:

Methods

(static) addOnloadHook(fn)

...

Schedule a function to run once the page is ready (DOM loaded).

Parameters:
Name Type Description
fn function
Since:
  • 1.5.8
Source:

(static) importScript(title) → {HTMLElement|null}

...

Import a local JS content page, for use by user scripts and site-wide scripts.

Note that if the same title is imported multiple times, it will only be loaded and executed once.

Parameters:
Name Type Description
title string
Since:
  • 1.12.2
Source:
Returns:

Script tag, or null if it was already imported before

Type
HTMLElement | null

(static) importScriptURI(url) → {HTMLElement|null}

...
Parameters:
Name Type Description
url string
Since:
  • 1.12.2
Source:
Returns:

Script tag, or null if it was already imported before

Type
HTMLElement | null

(static) importStylesheet(title) → {HTMLElement}

...

Import a local CSS content page, for use by user scripts and site-wide scripts.

Parameters:
Name Type Description
title string
Since:
  • 1.12.2
Source:
Returns:

Link tag

Type
HTMLElement

(static) importStylesheetURI(url, media) → {HTMLElement}

...
Parameters:
Name Type Description
url string
media string
Since:
  • 1.12.2
Source:
Returns:

Link tag

Type
HTMLElement