Conversaciones » Desarrolladores

Another way to Open Tab without Focus beside GM_openInTab

§
Publicado: 02/02/2017

Another way to Open Tab without Focus beside GM_openInTab

I am trying to open a tab without focus and also be able to close it afterwards. GM_openInTab allows me to open a tab without focus but I can no longer close it.`.close()` no longer works on the if you use GM_openInTab.

Any other way to open tab without focus?

§
Publicado: 02/02/2017
`.close()` no longer works on the if you use GM_openInTab.

I struggled with this problem, I had frustration. Browser security forbids close() issued from script.

§
Publicado: 03/02/2017

It's a pain. I am thinking of turning off the security.

Someone has suggested a GM_closeTab but it's been on to do list since 2013.

§
Publicado: 03/02/2017
Editado: 03/02/2017

..

woxxomMod
§
Publicado: 22/02/2017

FWIW, Tampermonkey has GM_closeTab, GM_focusTab, GM_tabsGet, GM_tabsGetAll, GM_tabsSet

§
Publicado: 22/02/2017
GM_closeTab, GM_focusTab, GM_tabsGet, GM_tabsGetAll, GM_tabsSet

Good news! Does @arantius know about it?

woxxomMod
§
Publicado: 23/02/2017

I'm afraid to ask as I suppose he doesn't care at best or is against it at worst.

§
Publicado: 24/02/2017
Editado: 24/02/2017
I'm afraid to ask

попытка - не пытка, однако
I meant - if the question is correctly formulated , @arantius will be obliged to answer it, the more so, as I recall, the question about GM_closeTab arises not the first time

woxxomMod
§
Publicado: 24/02/2017
Editado: 24/02/2017

Go ahead, ask. I think GM API has been essentially frozen for years. That's probably one of the reasons Scriptish addon appeared. Too bad it seems to be completely dead.

§
Publicado: 24/02/2017
Editado: 05/03/2017
frozen for years

maybe Alice can cure it ?

§
Publicado: 24/02/2017
Editado: 05/03/2017

small world of scriptwriters, hope you know, who is Alice

§
Publicado: 02/03/2017

If this is for personal use...

How about window.open() with the following set in about:config --

browser.link.open_newwindow => 3 (default setting)
browser.tabs.loadDivertedInBackground => true

-- does that work in a userscript?

§
Publicado: 31/03/2017

Late reply... didn't see a notification for it.

Thanks but not just for personal usage. ^_^

§
Publicado: 03/05/2017


// ==UserScript==
// @name Test
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author n/a
// @match https://greasyfork.org/en/forum/discussion/16463/another-way-to-open-tab-without-focus-beside-gm-openintab*
// @grant GM_openInTab
// ==/UserScript==

(function() {
'use strict';

var mmkay = GM_openInTab("https://www.kongregate.com", true);
setTimeout(function() {mmkay.close();}, 5000);
})();


Works in chrome... ;)

Publicar respuesta

Inicia sesión para responder.