I have a script, which a number of people use, which opens 10 tabs
at once. This has been working fine for years now. Since Firefox 40,
it's been behaving strangely. One of the 10 tabs will never finish
loading. Pressing Escape will not halt the loading process. You
cannot close the tab, and are forced to close the browser to get rid
of it.
The example script just opens 5 tabs. The tab that won't finish, and
the one to the left of it, cannot be closed. The original Google tab
can be closed, but it will reappear either immediately, or when you
again try to close one of the two "stuck" tabs. If one of the two
tabs tries to close itself through javascript, it crashes the
browser.
When I revert back to Firefox 39, all this weird behavior goes away,
and everything works normally.
You can run the script from Google.com page. It add a link to the
top. Change the number of tabs to open with the "j" variable.
// ==UserScript==
// @name Test Script 33
// @namespace http://gmscripts.locusprime.net
// @description Open Slashdot Tabs
// @include http://www.google.com/
// @include https://www.google.com/
// @version 01.00
// @grant GM_openInTab
// ==/UserScript==
var j = 5;
var divMain = document.getElementById('main');
var lnkOpener = document.createElement('a');
lnkOpener.href = 'javascript:void(0)';
lnkOpener.appendChild(document.createTextNode(`Click to
open ${j} tabs`));
lnkOpener.style.marginLeft = '100px';
divMain.appendChild(lnkOpener);
insertAheadOf(lnkOpener, divMain.firstChild);
lnkOpener.addEventListener('click', open10tabs ,
false);
function open10tabs() {
for (var i = 0; i < j; i++) {
GM_openInTab('http://slashdot.org/');
}
}
function insertAheadOf(newElement, anchorElement) {
anchorElement.parentNode.insertBefore(newElement,
anchorElement);
}