Always the same browser window

Monkey Targets Forums/HTML5/Always the same browser window

Midimaster(Posted 2012) [#1]
Is it possible to tell Monkey to use the same browser tab (window) on every compiler launch?

If I test very quickly, I often do not close the browser tab immediately. So I have to close some dozend browser tab....


BlackD(Posted 2012) [#2]
Alas, no, as it's a feature of the browser. Basically, Monkey is just telling your computer "Open this page with the default browser", then the browser is assigning the new opening page with a new tab. In some browsers, you may be able to disable this behavior.

If you're using Firefox I might be able to help. I believe (but can't test, because Win8 RC has a default browser bug so it always opens IE regardless, probably fixable but I haven't looked into it yet) that in Firefox you can change a value in the config to stop this.

In the address bar, enter about:config
Click OK to the warning dialog. It's joking about voiding your warranty. :p Well, at least, if you don't go around changing everything randomly.

Search for browser.link.open_newwindow

By default it should be set to 3. Double-click and change it to 1, then close and restart Firefox, then try a few compiles (if indeed, Firefox is your browser). You can always change it back to 3 if it doesn't work.

Documentation here: http://kb.mozillazine.org/Browser.link.open_newwindow

+BlackD

edit: Also, possibly simply change the config value Browser.link.open_newwindow.override.external from -1 to 1
This command isn't documented in the knowledge base, but I believe that it overrides links from external applications with a different behaviour - eg, you can leave open_newwindow set to 3 and have this set to 1, and it'll open external links in the same window. BUT, this can also be dangerous, because it'll mean if you're (for instance) on the forums typing up a post and go test compile something on Monkey, it'll override the window you've got open on the forums (for example .. same goes for the original post above). There's a reason the browser doesn't work that way by default. ;)


therevills(Posted 2012) [#3]
What I "try" to do is this:

* Code game
* Build and Run, which compiles and opens the browser
* Alter code
* Just Build
* Refresh tab
* ???
* Profit :)


Midimaster(Posted 2012) [#4]
cool!

thanks BlackD for this detailed help.

Thanks therevills, it works!

But it's a pity, that it is not working with key F5. F5 always compile and runs.


therevills(Posted 2012) [#5]
But it's a pity, that it is not working with key F5. F5 always compile and runs.

I know, right!? Thats why I put I "try" to do this, as I hit F5 all the bloody time and I close the brower all the bloody time :P

I'm programmed to hit F5 to build and run and to close my games straight away after I'm done testing them.

In Monk and Ted you can just build via F7, but my fingers dont listen ;)