Note: After publishing, 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 / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
function getRandomDongle() {
var randomDongles = ["","®","™","®™","™®"];
return randomDongles[Math.floor(Math.random()*randomDongles.length)];
}
function af2024(node,articleName,specifier,canTagline) {
var text = node.textContent;
var tagline = "from SmashWiki, the Super Smash Bros. wiki";
var extraTagline = "from SmashWiki, the Super Smash Bros. wiki that anyone can edit";
if (specifier !== null) {
node.textContent = 'The "'+text+'"'+getRandomDongle()+' '+specifier;
} else {
node.textContent = text+getRandomDongle();
}
if (articleName !== null && Math.random() > 0.75) {
node.textContent += ' of the "'+articleName+'"'+getRandomDongle()+' SmashWiki article';
}
var tagRandom = Math.random();
if (!canTagline) {
tagRandom = 0;
}
if (tagRandom > 0.95) {
node.textContent += " "+extraTagline;
} else if (tagRandom > 0.75) {
node.textContent += " "+tagline;
}
}
var articleName = document.querySelectorAll(".mw-page-title-main")[0].textContent;
document.querySelectorAll(".mw-page-title-main").forEach(function(node) {
af2024(node,null,"SmashWiki article",true);
});
document.querySelectorAll(".mw-headline").forEach(function(node) {
af2024(node,articleName,"section",true);
});
document.querySelectorAll(".infobox th").forEach(function(node) {
af2024(node,null,null,false);
});
document.querySelectorAll(".infobox td > b").forEach(function(node) {
af2024(node,null,null,false);
});
document.querySelectorAll("#pt-userpage > a").forEach(function(node) {
af2024(node,null,"user",false);
});