GM_openInTab

From GreaseSpot
Jump to: navigation, search


Contents

[edit] Description

This method opens the specified URL in a new tab. As of Greasemonkey 0.8.2 it obeys the built in "When I open a link in a new tab, switch to it immediately" preference (browser.tabs.loadInBackground).

Compatibility: Greasemonkey 0.5b+

[edit] Syntax

function GM_openInTab( url )

[edit] Arguments

url
String The URL to navigate the new tab to.

[edit] Returns

Before version 0.8.2: undefined

As of Greasemonkey 0.8.2: returns the window object created.

[edit] Examples

GM_openInTab("http://www.example.com/");
Personal tools