Skip to content

Instantly share code, notes, and snippets.

@XP1
Created July 23, 2011 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save XP1/1101650 to your computer and use it in GitHub Desktop.
Save XP1/1101650 to your computer and use it in GitHub Desktop.
Enhance Google Images: Prevents window focus in Google Images (annoyance with multiple focusing tabs).
// ==UserScript==
// @name Enhance Google Images
// @version 1.00
// @description Prevents window focus in Google Images (annoyance with multiple focusing tabs).
// @author XP1 (https://github.com/XP1/)
// @namespace https://gist.github.com/1101650/
// @include http*://google.*/imgres*
// @include http*://*.google.*/imgres*
// ==/UserScript==
// <script>var a = document.getElementById('rf');a && a.contentWindow && a.contentWindow.focus();</script>
/*jslint browser: true, vars: true, white: true, maxerr: 50, indent: 4 */
(function (opera)
{
"use strict";
opera.defineMagicVariable("a", function (currentValue)
{
return false;
}, null);
}(window.opera));
@XP1
Copy link
Author

XP1 commented Jul 23, 2011

I posted this user JS in this thread:

On Google Images, Opera won't new tab IN BACKGROUND, only in foreground.:
http://my.opera.com/community/forums/findpost.pl?id=9961622

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment