Note: After saving, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
// HoodBot Link
//
$.when( mw.loader.using('mediawiki.util'), $.ready ).then( function() {
mw.util.addPortletLink('p-personal', '/wiki/User:HoodBot', 'HoodBot', 'pt-hoodbot', 'Go to HoodBot\'s page', null, '#pt-preferences');
} );
//
// Add Since
//
mw.loader.load( '/w/index.php?title=UESPWiki:Javascript/addsince.js&action=raw&ctype=text/javascript' );
//
// Modify Sidebar
//
// Note: do not import ModifySidebar; doing so will cause intermittent scripting issues due to
// asynchronous import; using window.addEventListener fixes that issue, but at the cost of
// significant delays in updating the menu.
function ModifySidebar(action, section, name, link, sub1name, sub1link, sub2name, sub2link,
sub3name, sub3link, sub4name, sub4link, sub5name, sub5link) {
try {
switch (section) {
case "languages":
var target = "p-lang";
break;
case "toolbox":
var target = "p-tb";
break;
default:
var target = "p-" + section;
break;
}
if (action == "add") {
var node = document.getElementById(target)
.getElementsByTagName('div')[0]
.getElementsByTagName('ul')[0];
var aNode = document.createElement('a');
var liNode = document.createElement('li');
var ulSub = document.createElement('ul');
var a1Node = document.createElement('a');
var li1Node = document.createElement('li');
var a2Node = document.createElement('a');
var li2Node = document.createElement('li');
var a3Node = document.createElement('a');
var li3Node = document.createElement('li');
var a4Node = document.createElement('a');
var li4Node = document.createElement('li');
var a5Node = document.createElement('a');
var li5Node = document.createElement('li');
aNode.appendChild(document.createTextNode(name));
aNode.setAttribute('href', link);
liNode.appendChild(aNode);
liNode.className='plainlinks';
if (!((sub1name === undefined) && (sub1link === undefined))) {
a1Node.appendChild(document.createTextNode(sub1name));
a1Node.setAttribute('href', sub1link);
li1Node.appendChild(a1Node);
li1Node.className='plainlinks';
ulSub.appendChild(li1Node);
if (!((sub2name === undefined) && (sub2link === undefined))) {
a2Node.appendChild(document.createTextNode(sub2name));
a2Node.setAttribute('href', sub2link);
li2Node.appendChild(a2Node);
li2Node.className='plainlinks';
ulSub.appendChild(li2Node);
if (!((sub3name === undefined) && (sub3link === undefined))) {
a3Node.appendChild(document.createTextNode(sub3name));
a3Node.setAttribute('href', sub3link);
li3Node.appendChild(a3Node);
li3Node.className='plainlinks';
ulSub.appendChild(li3Node);
if (!((sub4name === undefined) && (sub4link === undefined))) {
a4Node.appendChild(document.createTextNode(sub4name));
a4Node.setAttribute('href', sub4link);
li4Node.appendChild(a4Node);
li4Node.className='plainlinks';
ulSub.appendChild(li4Node);
if (!((sub5name === undefined) && (sub5link === undefined))) {
a5Node.appendChild(document.createTextNode(sub5name));
a5Node.setAttribute('href', sub5link);
li5Node.appendChild(a5Node);
li5Node.className='plainlinks';
ulSub.appendChild(li5Node);
}
}
}
}
liNode.appendChild(ulSub);
}
node.appendChild(liNode);
}
if (action == "remove") {
var list = document.getElementById(target)
.getElementsByTagName('div')[0]
.getElementsByTagName('ul')[0];
var listelements = list.children;
var removeNextUl = false;
for (var i = 0; i < listelements.length; i++) {
var elem = listelements[i];
if (elem.tagName == 'LI') {
if ((elem.getElementsByTagName('a')[0].innerHTML == name) || (elem.getElementsByTagName('a')[0].href == link)) {
list.removeChild(elem);
removeNextUl = true;
i--;
} else {
removeNextUl = false;
}
} else {
if (elem.tagName == 'UL' && removeNextUl) {
list.removeChild(elem);
}
removeNextUl = false;
}
}
}
if (action == "clear") {
var list = document.getElementById(target)
.getElementsByTagName('div')[0]
.getElementsByTagName('ul')[0];
var listelements = list.childNodes;
for (var i = list.childNodes.length-1; i>=0; i--) {
list.removeChild(list.childNodes[i]);
}
}
} catch(e) {
// lets just ignore what's happened
return;
}
}
function CustomizeModificationsOfSidebar()
{
//general
ModifySidebar("clear", "general");
ModifySidebar("add", "general", "Recent Changes", "https://en.uesp.net/wiki/Special:RecentChanges");
//sections
ModifySidebar("remove", "sections", "Lore");
ModifySidebar("remove", "sections", "Blades");
ModifySidebar("remove", "sections", "Legends");
ModifySidebar("remove", "sections", "Elder Scrolls Online");
ModifySidebar("remove", "sections", "Redguard");
ModifySidebar("remove", "sections", "Battlespire");
ModifySidebar("remove", "sections", "TES Travels");
ModifySidebar("remove", "sections", "Books");
ModifySidebar("remove", "sections", "Mods");
//community
ModifySidebar("clear", "community");
ModifySidebar("add", "community", "Admin Noticeboard", "https://en.uesp.net/wiki/UESPWiki:Administrator_Noticeboard");
ModifySidebar("add", "community", "Community Portal", "https://en.uesp.net/wiki/UESPWiki:Community_Portal");
ModifySidebar("add", "community", "Twitter", "https://twitter.com/UESP_net");
//toolbox
ModifySidebar("remove", "toolbox", "Related Changes");
ModifySidebar("add", "toolbox", "Marked for Deletion", "https://en.uesp.net/wiki/Category:Marked_for_Deletion");
ModifySidebar("add", "toolbox", "Tes3 ES* Format", "https://en.uesp.net/wiki/Tes3Mod:Mod_File_Format");
ModifySidebar("add", "toolbox", "Tes4 ES* Format", "https://en.uesp.net/wiki/Tes4Mod:Mod_File_Format");
ModifySidebar("add", "toolbox", "Tes5 ES* Format", "https://en.uesp.net/wiki/Tes5Mod:Mod_File_Format");
ModifySidebar("add", "toolbox", "Toolbox", "https://en.uesp.net/w/index.php?title=User:RobinHood70/Toolbox");
//ModifySidebar("add", "toolbox", "Unpatrolled", "https://en.uesp.net/w/index.php?title=Special:RecentChanges&days=30&limit=5000&hidepatrolled=1&namespace=135&invert=1", "SR Talk", "https://en.uesp.net/w/index.php?title=Special:RecentChanges&days=30&limit=5000&hidepatrolled=1&namespace=135");
ModifySidebar("add", "toolbox", "Wanted Files", "https://en.uesp.net/wiki/Special:WantedFiles");
}
$(CustomizeModificationsOfSidebar);