User:Hallowizer/common.js: Difference between revisions

From DSiBrew
Jump to navigation Jump to search
Hallowizer (talk | contribs)
Imported from WiiBrew
 
(No difference)

Latest revision as of 01:11, 16 August 2021

/*if (location.href.startsWith("http://")) {
    let nav = document.querySelector("#p-navigation ul");
    let a = document.createElement("a")
    a.href = "https://" + location.href.substring("http://".length);
    a.innerText = "Upgrade to HTTPS";
    nav.insertAfter(nav.children[0]);
}*/

var alist = document.getElementsByTagName("a");
for (var i = 0; i < alist.length; i++) {
    if (alist[i].title === "\"Rollback\" reverts the last contributor's edit(s) to this page in one click") {
        alist[i].style.display = "none";
    }
}

document.getElementById("pt-mytalk").outerHTML += '<li id="hallowizernav"><a href="/wiki/User:Hallowizer/MyNavigation" title="Your navigation">Personal navigation</a></li>';