Jump to content

User:Timeshifter/common.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Timeshifter (talk | contribs) at 05:40, 25 July 2012 (combined search tools). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/* Embedded search automatically opened in new tab */
/* Embedded: at top right of pages, and talk archive searches */

$(function () {
    $('#searchform, #searchbox').attr({ target: '_blank' });
});

/* Ctrl-click and Cmd-click to open Special:Search button in new tab */
/* Cmd-click is Command-click. Command key is Apple key on Apple keyboards */ 

$('#search, .search-types, #search-types, #powersearch').bind('keyup keydown mousedown', 
  function (e){ $(this).attr('target', e.ctrlKey||e.metaKey?'_blank':'') })

/* Integrated watchlist. 
/* See: en.wikipedia.org/wiki/User_talk:Yair_rand/interwikiwatchlist.js */

importScript ("User:Yair rand/interwikiwatchlist.js");

/* Reference Tooltips. Version for testing before adding to gadget */
/* See: en.wikipedia.org/wiki/User:Yair_rand/ReferenceTooltips */
/* Discussion: en.wikipedia.org/wiki/User_talk:Yair_rand/ReferenceTooltips */

importScript('User:Yair rand/ReferenceTooltips.js'); importStylesheet('User:Yair rand/ReferenceTooltips.css');