User:JimTittsler/googlesearch.js

/* createGoogleSearch */ $(function { $('#searchform').append('    ');  if (skin === 'vector') {    $('#p-search').css('marginTop', '-1.5em');    $('#p-search').find('form, input').css('marginTop', '0.2em');  } });

/* showGoogleResults */ addOnloadHook(function {  if (wgPageName == "WikiEducator:Google_Search") {    var g = document.getElementsByTagName("head")[0];    var inlscript = document.createElement('script');    inlscript.type = 'text/javascript';    inlscript.innerHTML = 'var googleSearchIframeName = "cse-search-results";var googleSearchFormName = "cse-search-box";var googleSearchFrameWidth = 600;var googleSearchDomain = "www.google.com";var googleSearchPath = "/cse";';    g.appendChild(inlscript);    var resscript = document.createElement('script');    resscript.type = 'text/javascript';    resscript.src = "http://www.google.com/afsonline/show_afs_search.js";    g.appendChild(resscript);    g = document.getElementById('catlinks');    if (g) {      g.style.display = 'none';    }  } });