User:JimTittsler/monobook.js

function myProjects { var mytalk = document.getElementById("pt-mytalk"); if (mytalk) { var projecttab = document.createElement('li'); projecttab.setAttribute('id', 'jtproject'); projecttab.innerHTML = 'my projects'; mytalk.parentNode.insertBefore(projecttab, mytalk); } }

addOnloadHook(myProjects);

function cleanPages { var pages = ["/Online_manual", "/Training_resource_development_for_eXe",]; for (var i in pages) { if (window.location.pathname.indexOf(pages[i]) == 0) { document.getElementById("p-logo").innerHTML=''; } } }

addOnloadHook(cleanPages);

function ccButton { if (wgPageName == "Special:EmailUser") { var g = document.getElementById("mw-emailuser-recipient"); var button = document.createElement("input"); button.type = "submit"; button.value = "CC:"; g.appendChild(button); var cc = document.createElement("input"); cc.type = "textarea"; g.appendChild(cc); } }

addOnloadHook(ccButton);

function try_test { var fileref = document.createElement('script'); fileref.setAttribute("type", "text/javascript"); fileref.setAttribute("src", "/index.php?title=User:JimTittsler/test.js&action=raw&ctype=text/javascript"); document.getElementsByTagName("head")[0].appendChild(fileref); }

function try_tag { var fileref = document.createElement('script'); fileref.setAttribute("type", "text/javascript"); fileref.setAttribute("src", "/index.php?title=User:JimTittsler/t.js&action=raw&ctype=text/javascript"); document.getElementsByTagName("head")[0].appendChild(fileref); }

addOnloadHook(function {importScript('User:JimTittsler/googlesearch.js');});

/* function createGoogleSearch { //var g = document.getElementById("p-search"); var g = document.getElementById("searchform"); var output = document.createElement('div'); //output.className = "portlet"; output.innerHTML = '   '; g.appendChild(output); }

addOnloadHook(createGoogleSearch);

function showGoogleResults { if (wgPageName == "WikiEducator:Google_Search") { var g = document.getElementById("cse-search-results"); var output = document.createElement('div'); output.innerHTML = 'var googleSearchIframeName = "cse-search-results";var googleSearchFormName = "cse-search-box";var googleSearchFrameWidth = 600;var googleSearchDomain = "www.google.com";var googleSearchPath = "/cse";  '; g.appendChild(output); } }

addOnloadHook(showGoogleResults);

/* commons:Bugzilla:021572 -- commons:meta:user:Platonides */ addOnloadHook ( function { if (wgArticleId) addPortletLink("p-tb", wgScript + "?curid=" + wgArticleId + ( ((wgNamespaceNumber == 24) && getParamValue('dataset')) ? "&dataset=" + getParamValue('dataset') : "" ), "Short url", "t-curid", "Reference using its article id"); } );

addOnloadHook(function { /* hide some cruft if in an iFrame */  if (window.self != window.top) {  var content = document.getElementById('content');  if (content) {    content.style.margin = 0;    content.style.borderStyle = 'none';  }  var removals = ['column-one', 'siteNotice', 'firstHeading', 'contentSub', 'siteSub', 'footer', 'catlinks']  for (var i in removals) {    var g = document.getElementById(removals[i])    if (g) {      g.style.display = 'none';    }  }  document.body.style.background='none';  } });