Created
February 17, 2014 11:34
-
-
Save Noitidart/9049011 to your computer and use it in GitHub Desktop.
In Firefox, when in scratchpad and working in Environment > Browser, if do alert, it alerts in the window behind it, to make the alert happen within the scratchpad window use this technique.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var spwin = Services.wm.getMostRecentWindow(null); //this gets the scratchpad window | |
var str = 'rawr'; | |
var str = str[0].toUpperCase() + str.substr(1); | |
spwin.alert(str) // will upper case str this is just to demo the alert comes in the scratchpad window |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment