Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// ###################################################################
// See http://en.wikipedia.org/skins-1.5/common/wikibits.js
// Add some global links for my personal use
$(function()
{
var insertion_point = document.getElementById('pt-logout');
var el, i;
var links = [
{'url':'/wiki/User:LinguistAtLarge/Today\'s_AfD', 'anchor':'afd', 'title':'Today\'s articles for deletion'},
{'url':'/wiki/Special:NewPages', 'anchor':'new', 'title':'New pages'},
{'url':'http://commons.wikimedia.org/', 'anchor':'comm', 'title':'Wikimedia Commons'},
];
for (i = 0; i < links.length; ++i)
{
el = mw.util.addPortletLink('p-personal', links[i].url, links[i].anchor, '', links[i].title, '', insertion_point);
if (el && 'http://en.wikipedia.org' + links[i].url == document.location.href)
{
el.setAttribute('class', 'active');
}
}
mw.util.addPortletLink('p-personal', 'http://en.wikipedia.org/w/index.php?title=User_talk:LinguistAtLarge&action=edit§ion=new', '+', '', 'New talk thread', '', document.getElementById('pt-preferences'));
});
// ###################################################################
// add some links when viewing a user page or user talk page
$(function()
{
var debug = false;
if (debug) { alert('starting username links'); }
var loc = document.location.href;
// get username if it's a user (talk) page
var username = '';
var matches = loc.match(/(User:|User_talk:)([^\/&]+)/);
if (debug) { alert('matches: ' + matches); }
if (matches)
{
username = matches[2];
}
if (debug) { alert('username: ' + username); }
if (!username)
{
if (debug) { alert('no valid username found, aborting.'); }
return; // not on a user page
}
var links = [
{'url':'/wiki/Special:Contributions/' + username, 'anchor':'Contribs', 'title':'Contributions for ' + username},
{'url':'/wiki/Special:UserRights/' + username, 'anchor':'UserRights', 'title':'User Rights for ' + username},
{'url':'/wiki/Special:ListUsers/' + username, 'anchor':'ListUsers', 'title':username + ' on ListUsers'},
];
var el, i;
for (i = 0; i < links.length; ++i)
{
el = mw.util.addPortletLink('p-tb', links[i].url, links[i].anchor, '', links[i].title);
}
});
// ###################################################################
// add some links when viewing a javascript page
$(function()
{
var debug = false;
if (debug) { alert('starting javascript page links'); }
if (!wgPageName || wgPageName.substr(wgPageName.length - 3) != '.js')
{
if (debug) { alert('wgPageName: ' + wgPageName); }
if (debug) { alert('wgPageName.substr(wgPageName.length - 3)' + wgPageName.substr(wgPageName.length - 3)); }
if (debug) { alert('not a javascript page'); }
return;
}
var page = wgPageName; // paranoia :)
var rawurl = wgScript + '?title=' + encodeURIComponent(page.replace(/ /g,'_')).replace('%2F','/').replace('%3A',':') +
'&action=raw&ctype=text/javascript';
var links = [
{'url':rawurl, 'anchor':'Raw Version', 'title':'Raw Javascript version of ' + wgPageName},
];
var el, i;
for (i = 0; i < links.length; ++i)
{
el = mw.util.addPortletLink('p-tb', links[i].url, links[i].anchor, '', links[i].title);
}
});
// ###################################################################
// http://en.wikipedia.org/wiki/User:Mr.Z-man/closeAFD.js
// See [[User:Mr.Z-man/closeAFD]] for documentation
importScript('User:Mr.Z-man/closeAFD.js');
// ###################################################################
// add some keyboard shortcuts on AfD pages
importScript('User:LinguistAtLarge/AfDNav.js');
// ###################################################################
// move images to commons
importScript('User:Krimpet/CH2.js');
// ###################################################################
// twinkle stuff
// config
if( typeof( TwinkleConfig ) == 'undefined' ) TwinkleConfig = {};
// my twinkle config
TwinkleConfig.logProdPage = 'Prodded'; // name of my user subpage for the log
TwinkleConfig.logProdAddBottom = false; // add to the top of the page
// my twinkle PROD log script
importScript('User:LinguistAtLarge/twinkleprodlog.js');
// hide some twinkle links I don't want (so I can keep it installed as a gadget)
$(function(){
var ids = ['tw-deprod', 'tw-pbatch', 'tw-batch', 'tw-deli', 'tw-unlink', 'tw-batch-undel'];
var i, el;
for (i = 0; i < ids.length; ++i)
{
el = document.getElementById(ids[i]);
if (el)
{
el.style.display = 'none';
}
}
});
// ###################################################################
// log AfD participation
afdlog_config = {
'afdlog_page' : 'AfdParticipationLog',
'autolog' : false,
};
importScript('User:LinguistAtLarge/afdlog.js');
// ###################################################################
// article image toggle
importScript('User:LinguistAtLarge/imagetoggle.js');
// ###################################################################
// add a button to the editor to insert the splitconvo template
importScript('User:LinguistAtLarge/splitconvobutton.js');
// ###################################################################
// popups configuration
var popupMaxWidth = 500;
var popupPreviewFirstParOnly = false;
var popupMaxPreviewSentences = 8;
var popupMaxPreviewCharacters = 1200;
var popupLazyDownloads = false;
var popupLazyPreviews = false;
var popupDelay = 0.1;
var popupHideDelay = 0.1;
var popupDragHandle = 'popupTopLinks';
// ###################################################################
// Delsorting MUST BE LAST OR IT BORKS ADDING ITEMS TO THE p-cactions PORTLET.
// http://en.wikipedia.org/wiki/User:Jayvdb/Deletion_sorting_tool
//importScript('User:LinguistAtLarge/util.js');
//importScript('User:LinguistAtLarge/wikipage.js');
importScript('User:Quarl/util.js');
importScript('User:Quarl/wikipage.js');
importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu');
//importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css'); // for some reason, this causes problems
//importScript('User:AzaToth/twinkle.js');
importScript('Wikipedia:WikiProject Deletion sorting/delsort.js');
DelsortConfig = {
debugLevel : 0,
watchDelsortedLists : 1,
watchDelsortedAfd : 1,
shortcuts : ['Authors','Australia','Lists','Living people'],
transcludeRE : new RegExp('Wikipedia:Deletion today|Wikipedia:Articles for deletion\/Log\/|User:LinguistAtLarge\/Today\'s AfD'),
debugLevel : 0,
}
//importScript('User:LinguistAtLarge/delsort.js');