importScript('User:Kanonkas/twinkle.js');
/*
//navigation menu
addOnloadHook(function () {
//Work in progress
mw.util.addPortletLink('p-navigation', 'http://en.wikipedia.org/wiki/User:Spinningspark/Work_in_progress', 'Work in progress', 'n-wip', 'Work in progress page', '', '');
//Usertalk namespace templates
mw.util.addPortletLink('p-navigation', 'http://en.wikipedia.org/wiki/Wikipedia:Template_messages/User_talk_namespace', 'Usertalk templates', 'n-usertemp', 'Usertalk namespace templates', '', '');
mw.util.addPortletLink('p-navigation', 'http://en.wikipedia.org/wiki/User:Spinningspark/Useful_templates', 'My useful templates', 'n-mytemp', 'My useful templates', '', '');
mw.util.addPortletLink('p-navigation', 'http://en.wikipedia.org/wiki/Template:HD', 'Helpdesk templates', 'n-hd', 'Helpdesk templates', '', '');
});
//end navigation menu
//personal menu
//Coding and formatting
addOnloadHook(function () {
mw.util.addPortletLink('p-personal', 'http://en.wikipedia.org/wiki/User:Spinningspark/Coding_and_formatting', 'Coding help', 'pt-coding', 'Go to Coding and formatting page', '', document.getElementById('pt-logout'));
});
//end personal menu
//content action tabs
//Is X an admin?
var uservar='';
if( wgNamespaceNumber == 3 || wgNamespaceNumber == 2 ) {
if (wgTitle.indexOf('/')>=0) {uservar=wgTitle.substring(0,wgTitle.indexOf('/'));}
else {uservar=wgTitle;}
addOnloadHook(function () {
mw.util.addPortletLink('p-cactions', 'http://en.wikipedia.org/w/index.php?title=Special:ListUsers&limit=1&username='+uservar, 'Admin?', 'ca-admin', 'Determine if user is an admin', '', '');
});
}
//end content action tabs
//Search menu 2
var gfor = ''
function getSearchInput() {
var gfor=document.getElementById("searchInput").innerHTML;
}
$(function() {
addPortlet('p-search2','', 'p-interaction');
//Google
mw.util.addPortletLink('p-search2', 'http://www.google.com/custom?domains=en.wikipedia.org&sitesearch=en.wikipedia.org&q='+gfor, 'Search with Google', 's-google', 'Google search', '', '');
});
//end Search menu 2
//interaction menu
addOnloadHook(function () {
mw.util.addPortletLink('p-interaction', 'http://en.wikipedia.org/wiki/User:Spinningspark/Mediation', 'Mediation', 'i-hd', 'Mediation links', '', '');
});
//end interaction menu
//toolbox additional tools
$(function() {
mw.util.addPortletLink('p-tb', 'http://en.wikipedia.org/wiki/Special:Upload', 'Upload form', 't-upload_form', 'Go direct to upload form', '', document.getElementById('t-upload'));
});
//Page size function
importScript('User:Spinningspark/PageSize.js');
//end toolbox additional tools
//Toolbox 2 Administration tools
$(function() {
addPortlet('p-tb2', 'Admin tools', 'p-coll-print_export');
//Wikiblame
mw.util.addPortletLink('p-tb2', 'http://wikipedia.ramselehof.de/wikiblame.php', 'Wikiblame', 't-wikiblame', 'Go to Wikiblame tool', '', '');
//Wikistalking
mw.util.addPortletLink('p-tb2', 'http://toolserver.org/~mzmcbride/cgi-bin/wikistalk.py', 'Wikistalking', 't-wikistalking', 'Go to Wikistalking tool', '', '');
//Watchers
mw.util.addPortletLink('p-tb2', 'http://toolserver.org/~mzmcbride/cgi-bin/watcher.py?db=enwiki_p&titles='+wgPageName, 'Watchers', 't-watchers', 'Numbers watching this page', '', '');
//CIDR range contributions
mw.util.addPortletLink('p-tb2', 'http://toolserver.org/~soxred93/rangecontribs/', 'CIDR range contributions', 't-CIDR_range', 'CIDR range contributions tool', '', '');
});
//end toolbox 2
//Toolbox 3: Editing tools
$(function() {
addPortlet('p-tb3', 'Editing tools', 'p-coll-print_export');
//WebCite
mw.util.addPortletLink('p-tb3', 'http://www.webcitation.org/archive', 'WebCite', 't-webcite', 'Web Citation archive tool', '', '');
});
//end toolbox 3
//Toolbox 4: Statistics
$(function() {
addPortlet('p-tb4', 'Statistics', 'p-coll-print_export');
var uservar='';
if ( wgNamespaceNumber == 3 || wgNamespaceNumber == 2 ) {
if (wgTitle.indexOf('/')>=0) {uservar='name='+wgTitle.substring(0,wgTitle.indexOf('/'))+'&';}
else {uservar='name='+wgTitle+'&';}
}
//X's user stats tool
mw.util.addPortletLink('p-tb4', 'http://toolserver.org/~tparis/pcount/index.php?'+uservar+'lang=commons&wiki=wikimedia', 'User statistics', 't-user stats', "X's user statistics", '', '');
//Page editing stats
mw.util.addPortletLink('p-tb4', 'http://vs.aka-online.de/cgi-bin/wppagehiststat.pl?page='+wgPageName+'&lang=commons.wikimedia', 'Page editing statistics', 't-pagestats', 'Page statistics', '', '');
//Page creation counter
mw.util.addPortletLink('p-tb4', 'http://toolserver.org/~soxred93/pages/index.php?'+uservar+'lang=commons&wiki=wikimedia&namespace=6&redirects=noredirects', 'Page creation counter', 't-pagecreatecount', 'Users page creation count', '', '');
//Page hit counter
var hitdate=new Date();
var hitmonth=hitdate.getMonth()+1 //Date() counts months from zero
var leading0=''
if (hitmonth.length=1) {leading0='0';}
else {leading0='';}
mw.util.addPortletLink('p-tb4', 'http://stats.grok.se/en/'+hitdate.getFullYear()+leading0+hitmonth+'/'+wgPageName, 'Page hit counter', 't-pagehit', 'Page hit counter', '', '');
});
//end toolbox 4
//Add sidebar menu function ('User:Anakin101/addPortlet.js')
function addPortlet(id, title, before) {
var copy = document.getElementById('p-tb');
var div = document.createElement('div');
div.setAttribute('id', id);
div.setAttribute('class', copy.getAttribute('class'));
div.innerHTML = '<h5>' + title + '</h5>';
var pBody = document.createElement('div');
pBody.setAttribute('class', copy.getElementsByTagName('div')[0].getAttribute('class'));
pBody.appendChild(document.createElement('ul'));
div.appendChild(pBody);
if (before && (before = document.getElementById(before))) {
copy.parentNode.insertBefore(div, before);
} else {
copy.parentNode.appendChild(div);
}
return pBody;
}
//end sidebar menu function
*/