MediaWiki

Monobook.js: Difference between revisions

(New page: →‎Deprecated; use [[MediaWiki:common.js]]: // User:Henrik/sandbox/google-search (please include this line) function install_search() { document.getElementById('searchBody').inne...)
 
No edit summary
 
(52 intermediate revisions by 4 users not shown)
Line 1: Line 1:
/* Deprecated; use [[MediaWiki:common.js]] */
function addJs(js) { $('<script type="text/javascript" src="' + js + '"></script>').insertAfter('#globalWrapper'); }


// [[User:Henrik/sandbox/google-search]] (please include this line)
$(document).ready(function() {
function install_search()
    addJs('https://vanisource.org/js-include/vanisearch-template-adjust.js');
{
});
document.getElementById('searchBody').innerHTML+='<div>'+
'<FORM method=get action="http://www.google.com/search">'+
'<input type=hidden name="ie" value="UTF-8" /><input type=hidden name="oe" value="UTF-8" />'+
'<INPUT id="searchInput" name="q" type="text" accesskey="f" value="" />'+
'<input type="hidden" name="domains" value="en.wikipedia.org" />'+
'<input type=radio name=sitesearch value="">Web'+
'<input type=radio name=sitesearch value="en.wikipedia.org" checked />WP'+
'<INPUT type="submit" name="btnG" VALUE="Google Search"  /></FORM></div>';
}
addOnloadHook(install_search);

Latest revision as of 06:29, 13 June 2017

function addJs(js) { $('<script type="text/javascript" src="' + js + '"></script>').insertAfter('#globalWrapper'); }

$(document).ready(function() {
    addJs('https://vanisource.org/js-include/vanisearch-template-adjust.js');
});