This API method opens the specified URL in a new background tab. Foreground loading may be globally overridden by setting the Mozilla preference about:config?filter=browser.tabs.loadInBackground to false
.
GM_openInTab( url , option )
Value: Function
Returns: undefined
Compatibility: Greasemonkey 0.5 beta - 3.12.0
Access: @grant
Parameters
Properties |
---|
url |
option |
Value: String
Usage: url = "http://www.example.com/";
Compatibility: Greasemonkey 3.2.0+
Value: undefined, Boolean
Default: undefined
Usage:
option = true;
option = false;
Compatibility: Greasemonkey 3.4.0+
Value: undefined, Boolean (backward compatible), Object
Default: undefined
Usage:
option = undefined;
option = {};
option = { active: undefined, insert: undefined };
option = { active: true, insert: undefined };
option = { active: true };
option = { active: undefined, insert: true };
option = { insert: true };
option = { active: true, insert: true };
undefined (default behavior should honor browser configuration)
active
true
or tab to background blur on false
insert
true
or tab to after last on false
GM_openInTab("http://www.example.com/");