User:JimTittsler/vector.js

importScript('User:JimTittsler/googlesearch.js');

// reader mode for narrow screens // should follow googlesearch.js if used // window.weReader = true; // force to always use reader mode, regardless of width // window.weReaderWidth = 1024; // max width that activates reader mode // now a gadget: importScript('User:JimTittsler/reader.js');

//if (wgPageName === 'Category:Stream') { // $.getScript('/skins/common/we/stream.js'); //}

$(function {  $('#n-recentchanges').find('a:first').attr('href', '/index.php?title=Special:RecentChanges&hidebots=0');  $('#n-recentchanges').after('New pages');  var st = $('#pt-mytalk').attr('style');  st = st ? ' style="' + st + '"': '';  $('#pt-mytalk')    .after('My blog')    .after('My projects')    .after('' + document.getElementById('content').offsetHeight + 'px');  // change the font and size used for edit box  $('#wpTextbox1').css('font-family', 'Courier New').css('font-size', '14px');  // gardening tool  if ($.inArray(wgPageName, ['Special:NewPages', 'Special:RecentChanges']) > -1) {    $.getScript('/skins/common/we/spam.js'); } if (wgAction === 'history') { $.getScript('/skins/common/we/deleterevs.js'); } $('#p-coll-create_a_book li a[href*="add_article"]').parent .after('Add page &amp; subpages</a></li>'); $('#t-bookmaker').click(function {   $.getScript('/skins/common/we/bookmaker.js');    return false;  });

/* http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_scripts/Scripts/External_editor */ var editTab = document.getElementById("ca-edit"); if (!editTab) return; var editURL = editTab.getElementsByTagName("a")[0].href; addPortletLink("p-cactions", editURL + "&externaledit=true", "EE", "ca-exted", "External editor", "");

/* hide the watch checkbox on LQT postings */ var ef, labels; if (document.getElementById("lqt_method")) { ef = document.getElementById('editform'); /* narrow the search for labels */ if (ef) { document.getElementById('wpMinoredit').style.display = 'none'; document.getElementById('wpWatchthis').style.display = 'none'; labels = ef.getElementsByTagName('label'); for (var i=0; i<labels.length; ++i) { if ((labels[i].htmlFor === 'wpMinoredit') || (labels[i].htmlFor === 'wpWatchthis')) { labels[i].style.display = 'none'; }     }    }  } });