Close it script

Get help and give out your ideas for improvement.
User avatar
Syth
MagiStream Donor
Member of The Dark Brotherhood Member of Artificer's Association Member of Preservationists Association An icon depicting the element Air
CreaturesTrade
Posts: 4914
Joined: January 26th, 2010, 4:51:10 pm
Gender: Female
Location: Benden Wyer, Pern
Contact:

Re: Close it script

Post by Syth »

BBkat wrote:
Syth wrote:
Tekla wrote:I don't know an extension, but maybe this will help?

Which browser are you using?

I use chrome; to use closeit I installed tampermonkey and put closeit in as a userscript. It can probably work on anything that can do userscripts.

Code: Select all

// ==UserScript==
// @name           CloseIt
// @namespace      Magistream
// @include        http://magistream.com/creature/*
// ==/UserScript==

setTimeout('window.close();',2000);

this code works a little TOO well... it also keeps me from seeing people's creature pages...

edit: and apparently ANY tab with "magistream" in its url.... something is off with that script.

Did you make sure to copy everything as above?
Because this part-

Code: Select all

// @include        http://magistream.com/creature/*
Is what tells it to close creature pages, which is why you can't see them, you have to turn Tampermonkey off or else they'll just close right away. Which is what it's supposed to do.
I don't know why it'd be closing other pages though, unless you forgot to add the last pat of the url that says /creature/*
yes. I used the "select all" to make sure I got the entire code.

edit: believe me, that confused me as well, but that's what it was doing. I had to disable tampermonkey just to be able to run around ms normally as I am now.
Beware of dragons for you are small & tasty.I Pledge Allegiance to the Lamb
Love maybe love, but there's no excuse for the ignorance.
RIP HiddenMystic, you will be missed.

ImageImageImageImageImage
Thanks for clicking! 0/25 gifts thank you!

ImageImageImageImage

Shop
Raffle
Wishlist
Image
User avatar
Tekla
MagiStream Donor
Member of Society of the Trident Member of Artificer's Association Member of Preservationists Association
CreaturesTrade
Posts: 9557
Joined: December 18th, 2009, 5:16:34 pm
Gender: Kraken
Location: The Forgotten City
Contact:

Re: Close it script

Post by Tekla »

Okay, so, I just installed tampermonkey and the code I posted exactly as is to test this. The only pages it's closing are creature pages, so the code and tampermonkey are both working as they should for me.

So the script has to have been copied incorrectly, probably on the @include line, or there's some kind of browser or computer setting messing things up (although I can't imagine what that could be). If you have multiple browsers, try installing it on all of them and see if it's only broken in that browser (I'm using chrome).

Make sure you're using the most updated version of the browser on which you installed it. Try uninstalling and reinstalling, and restarting the browser after you've done that.

Unfortunately that's all I can really offer on the support front. D:

ImageImageImage
~
ImageImageImageImageImage
--
"Oh! My feet of fire! My burning feet of fire!"
User avatar
Danafox
MagiStream Donor
Member of The Herbalist's Guild Member of Artificer's Association Member of Preservationists Association
CreaturesTrade
Posts: 8862
Joined: August 12th, 2010, 9:05:48 am
Gender: Female

Re: Close it script

Post by Danafox »

@Syth
BBkat wrote:Greasemonkey can be turned on and off, for the script to work you must turn it on(done by simply clicking the monkey face symbol that should be, somewhere on your browser, so that it's no greyed out. To make sure the script installed properly simply click the dropdown menu from GM(there should be a tiny arrow next to the monkey face, if not, try right clicking) and click 'Manage User Scripts' which should open up your Add-ons Manager and, if it downloaded properly, should be listed on the page.
If it is, then turn GM on and click away.
This is why I use Greasemonkey. The being able to turn it on/off at a simple click of a button is totally worth it/super important to me.

If Tampermonkey has this same ability, I advise that you use it, otherwise the script is CORRECT and it's doing what it's suppose to.
Image
ImageImageImageImageImage
Dana's Sales Bin
LTT Donis for Below1Percent

Thank you to all my gifters! <3
Image
User avatar
Syth
MagiStream Donor
Member of The Dark Brotherhood Member of Artificer's Association Member of Preservationists Association An icon depicting the element Air
CreaturesTrade
Posts: 4914
Joined: January 26th, 2010, 4:51:10 pm
Gender: Female
Location: Benden Wyer, Pern
Contact:

Re: Close it script

Post by Syth »

I figured out what the problem was.

It wasn't the code given... I accidentally left the sample script in that appears when you hit "add a new script" and that was what was goofing the entire thing up. For the sake of those who are like me (and have forgotten) or just don't know... maybe you should add to the original post that says to make sure that the "sample" is deleted before saving the new script.
Beware of dragons for you are small & tasty.I Pledge Allegiance to the Lamb
Love maybe love, but there's no excuse for the ignorance.
RIP HiddenMystic, you will be missed.

ImageImageImageImageImage
Thanks for clicking! 0/25 gifts thank you!

ImageImageImageImage

Shop
Raffle
Wishlist
Image
User avatar
Nexosa
Member of Society of the Trident Member of Artificer's Association Member of Preservationists Association An icon depicting the element Earth
CreaturesTrade
Posts: 2887
Joined: July 5th, 2010, 10:13:57 am
Gender: Female
Location: Transylvania

Re: Close it script

Post by Nexosa »

Hey c: Sorry for bumping this topic, but my script doesn`t work for a while. I`m using Firefox 64.0.2 and Greasemonkey. I used the script from here 3:
Spoiler
Image
Wish list:Hummingbirds,Any grpyhon hatchling,Any jackalope hatchling,,Pygmy wolpertinger,Rabbitsune



My Wishlist

Image
Fox by Munin,Joey doggo by Seabra
User avatar
Graveworm
MagiStream Donor
Member of Society of the Trident Member of Artificer's Association Member of Preservationists Association
CreaturesTrade
Posts: 1980
Joined: December 23rd, 2011, 12:33:41 am
Gender: Male
Location: Nosgoth

Re: Close it script

Post by Graveworm »

Nexosa wrote:Hey c: Sorry for bumping this topic, but my script doesn`t work for a while. I`m using Firefox 64.0.2 and Greasemonkey. I used the script from here 3:
My script stopped working *today* D:
I am using tampermonkey on chrome and the script worked fine until I clicked the button to temporarily disable it for a bit. Now it doesn't work no matter WHAT I try- reinstalling it, restarting browser/computer, etc. Very frustrating and if anyone has any suggestions I am all ears.
ImageImageImageImageImageImageImageImage
User avatar
Jeh
Member of The Herbalist's Guild Member of Artificer's Association
CreaturesTrade
Posts: 1944
Joined: March 30th, 2015, 1:43:32 pm
Location: India

Re: Close it script

Post by Jeh »

Graveworm wrote:
Nexosa wrote:Hey c: Sorry for bumping this topic, but my script doesn`t work for a while. I`m using Firefox 64.0.2 and Greasemonkey. I used the script from here 3:
My script stopped working *today* D:
I am using tampermonkey on chrome and the script worked fine until I clicked the button to temporarily disable it for a bit. Now it doesn't work no matter WHAT I try- reinstalling it, restarting browser/computer, etc. Very frustrating and if anyone has any suggestions I am all ears.
Use linkclump on chrome. It has an inbuilt ability to close tabs it opens. You just have to go to link clump options and enable it. Works beautifully on both chrome and opera. Have not tried it on other browsers.
Link to the extension for Chrome
https://chrome.google.com/webstore/deta ... fefj?hl=en
ImageImageImageImageImage
Jeh's Gifts

I sell the creatures in my sale tab. If interested, please send me a PM.
Prices can be found on my profile.
25/25 presents, thank you.My Wishlist
User avatar
Danafox
MagiStream Donor
Member of The Herbalist's Guild Member of Artificer's Association Member of Preservationists Association
CreaturesTrade
Posts: 8862
Joined: August 12th, 2010, 9:05:48 am
Gender: Female

Re: Close it script

Post by Danafox »

I used to have this script on my old computer...but don't have it plugged in etc...so yeah have no access to it right now.
Maybe when I have time, I'll try to see if I can set it up on Firefox but no promises at the moment. (I miss being lazy and clicks autoclosing) but then I remember what a pita it is to keep up with this thing to maintain working. bleh.
Image
ImageImageImageImageImage
Dana's Sales Bin
LTT Donis for Below1Percent

Thank you to all my gifters! <3
Image
User avatar
glittergirl
MagiStream Donor
Member of The Dark Brotherhood Member of Artificer's Association
CreaturesTrade
Posts: 2978
Joined: January 17th, 2010, 12:06:43 pm
Gender: Female

Re: Close it script

Post by glittergirl »

Nexosa wrote:Hey c: Sorry for bumping this topic, but my script doesn`t work for a while. I`m using Firefox 64.0.2 and Greasemonkey. I used the script from here 3:
Spoiler
Image
I checked and it seems that with Firefox 2.0+ a script is by default not allowed to close a window it did not open. I'm not sure for how long your script has not been working, but I'm seeing google hits about it as far back as 2006, so I'm not sure whether the following solution will fix it for you, but one can always try and hope I suppose :).

Anyway, the solution I found was: If you want to allow the CloseIt script to close the windows, you have to change the advanced config settings.

1. Open Firefox
2. Enter "about:config" in the URL/address area.
3. You will get a warning that basically states you need to be careful adjusting the settings.
4. Click the button and you will get a giant list of settings. There will be a search area above it, so use that to find the setting you need to change: "dom.allow_scripts_to_close_windows".
5. Once you have found these, simply double click on the "false" that's listed in the column "value" and it will change to "true".
6. Close the about:config page and your script should now again close windows.

Hope that works for you <3.
Graveworm wrote:My script stopped working *today* D:
I am using tampermonkey on chrome and the script worked fine until I clicked the button to temporarily disable it for a bit. Now it doesn't work no matter WHAT I try- reinstalling it, restarting browser/computer, etc. Very frustrating and if anyone has any suggestions I am all ears.
I'm using the script with Chrome as well, and I tried disabling and then enabling the script again via the Tampermonkey dashboard and the script still works fine.

Is it still not working for you?

If so:
Spoiler
Can you tell me exactly what you've done to get this problem? Maybe I can recreate it or perhaps find a solution/fix for you.

Since I'm not sure what exactly you've tried to fix it, some simple checks perhaps:
- are you still Tampermonkey is active/enabled?
- when you click on Tampermonkey and then on 'Dashboard', is the CloseIt script still listed under 'Installed scripts'? If so, are you sure you've enabled this script again?

If this does not fix things, perhaps you can try opening a new window in Chrome, pressing F12 to open the Developer Tools and then click on 'Console'. Then try opening some creature pages. If there is anything red or yellow listed in the Console window (the one you've just opened)? If so, please send me a screenshot (or post it here), and perhaps that will enlighten us as to what is the problem :).
Also, if you're not sure what to do, feel free to PM me.
Please click the eggs & hatchies in my Main Tab =D
!!Please do NOT mine my keep!!
ImageImageImageImageImage
User avatar
Graveworm
MagiStream Donor
Member of Society of the Trident Member of Artificer's Association Member of Preservationists Association
CreaturesTrade
Posts: 1980
Joined: December 23rd, 2011, 12:33:41 am
Gender: Male
Location: Nosgoth

Re: Close it script

Post by Graveworm »

glittergirl wrote:
Nexosa wrote:Hey c: Sorry for bumping this topic, but my script doesn`t work for a while. I`m using Firefox 64.0.2 and Greasemonkey. I used the script from here 3:
Spoiler
Image
I checked and it seems that with Firefox 2.0+ a script is by default not allowed to close a window it did not open. I'm not sure for how long your script has not been working, but I'm seeing google hits about it as far back as 2006, so I'm not sure whether the following solution will fix it for you, but one can always try and hope I suppose :).

Anyway, the solution I found was: If you want to allow the CloseIt script to close the windows, you have to change the advanced config settings.

1. Open Firefox
2. Enter "about:config" in the URL/address area.
3. You will get a warning that basically states you need to be careful adjusting the settings.
4. Click the button and you will get a giant list of settings. There will be a search area above it, so use that to find the setting you need to change: "dom.allow_scripts_to_close_windows".
5. Once you have found these, simply double click on the "false" that's listed in the column "value" and it will change to "true".
6. Close the about:config page and your script should now again close windows.

Hope that works for you <3.
Graveworm wrote:My script stopped working *today* D:
I am using tampermonkey on chrome and the script worked fine until I clicked the button to temporarily disable it for a bit. Now it doesn't work no matter WHAT I try- reinstalling it, restarting browser/computer, etc. Very frustrating and if anyone has any suggestions I am all ears.
I'm using the script with Chrome as well, and I tried disabling and then enabling the script again via the Tampermonkey dashboard and the script still works fine.

Is it still not working for you?

If so:
Spoiler
Can you tell me exactly what you've done to get this problem? Maybe I can recreate it or perhaps find a solution/fix for you.

Since I'm not sure what exactly you've tried to fix it, some simple checks perhaps:
- are you still Tampermonkey is active/enabled?
- when you click on Tampermonkey and then on 'Dashboard', is the CloseIt script still listed under 'Installed scripts'? If so, are you sure you've enabled this script again?

If this does not fix things, perhaps you can try opening a new window in Chrome, pressing F12 to open the Developer Tools and then click on 'Console'. Then try opening some creature pages. If there is anything red or yellow listed in the Console window (the one you've just opened)? If so, please send me a screenshot (or post it here), and perhaps that will enlighten us as to what is the problem :).
Also, if you're not sure what to do, feel free to PM me.
Thank you for all this! Literally the only thing I did was disable/enable the script for a short period of time. Closeit is the *only* userscript I have in there at all, and I tried enabling/disabling, uninstalling the script, restarting my browser, then reinstalling it, and every other combination I could think of with no success.
What finally DID work was uninstalling and reinstalling *Tampermonkey* itself, then reinstalling the closeit script again. It works fine now, but I haven't tried disabling it again.
ImageImageImageImageImageImageImageImage
Post Reply

Return to “Support and Suggestions”