tabs closing solution

opsfafsme

Well-Known Member
Rule The Universe
VIP
Joined
Jul 2, 2018
Messages
243
Reaction score
91
Website
OnlinePiercingShop.com
Achievement
:)some sites open too many tabs, this trick will help close all tabs except the main one and save a few points.
JavaScript:
tabs = await TabCount();
while (tabs > 1) {
    await TabFocus(tabs--);
    await Delay(100);
    await EvaluateScript("setTimeout(function(){var ww = window.open('about:blank', '_self'); ww.close();}, 500);");
}
await TabFocus(tabs);
 
Last edited:
  • Like
Reactions: wernerk93

coolindark

New Member
Premium
Joined
Nov 28, 2019
Messages
2
Reaction score
0
Achievement
Some sites use tab-change. Is it possible to select the right tab with the site's URL?
 

opsfafsme

Well-Known Member
Rule The Universe
VIP
Joined
Jul 2, 2018
Messages
243
Reaction score
91
Website
OnlinePiercingShop.com
Achievement
Some sites use tab-change. Is it possible to select the right tab with the site's URL?
yes, of course, it’s possible, for this you can check the url of the tab
 
  • Like
Reactions: Evgeny_Volin

Evgeny_Volin

New Member
VIP
Joined
Jan 28, 2021
Messages
39
Reaction score
0
Achievement
yes, of course, it’s possible, for this you can check the url of the tab

Popunder opens for me and becomes the main one.
How do I return, make the main window with my site?
And close this Popunder


This script does not work, everything stops after it.


while(true) {
if(await TabCount() > 1)//check if we have popup opened
{
await TabFocus("!site.com"); //focus to the tab which not is site.com
await ExecuteScript('close()'); //close it
break;
}
await Delay(1000);
}
TabFocus(1);
 
Last edited:

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu