safari - Block Gmail from stealing focus with user script -


i'm trying stop gmail stealing focus using user script. i'm using ninjakit on safari. far have

// ==userscript== // @name gmail            // @namespace      https://mail.google.com // @include        https://mail.google.com/* // ==/userscript== //alert("it's working"); window.focus = function(){}; 

but still window manages steal focus.

i can see it's indeed activating userscript if comment out alert line: alert pops (many times).

test opening mail.google.com/ , switching new tab. gmail loads in background switches focus, stealing other tab.


Comments

Popular posts from this blog

javascript - addthis share facebook and google+ url -

java - Simulate the tossing of a coin three times and print out the percentage of cases in which one gets three tails -

c++ - Class declaration error at explicit keyword -