From Test-Scratch-Wiki
-iviedwall- (talk | contribs) m (Fixed a bug) |
-iviedwall- (talk | contribs) m (Removing semicolons at the end of lines (is that needed)) |
||
Line 1: | Line 1: | ||
/* Remove lang attribute from editor so the font is more readable (not having syntax highlight is enough) */ | /* Remove lang attribute from editor so the font is more readable (not having syntax highlight is enough) */ | ||
− | document.getElementById("wpTextbox1").removeAttribute("lang") | + | document.getElementById("wpTextbox1").removeAttribute("lang") |
/* Add semicolon */ | /* Add semicolon */ | ||
− | const scDiv = document.createElement("div") | + | const scDiv = document.createElement("div") |
− | const semicolon = document.createTextNode(" ;") | + | const semicolon = document.createTextNode(" ;") |
− | scDiv.appendChild(semicolon) | + | scDiv.appendChild(semicolon) |
− | const notNav = document.getElementById("not-nav") | + | const notNav = document.getElementById("not-nav") |
− | notNav.appendChild(scDiv) | + | notNav.appendChild(scDiv) |
/* Add status to left navbar */ | /* Add status to left navbar */ | ||
− | const statusLI = document.createElement("li") | + | const statusLI = document.createElement("li") |
− | statusLI.setAttribute("id", "n-Your-Status") | + | statusLI.setAttribute("id", "n-Your-Status") |
− | const statusLink = document.createElement("a") | + | const statusLink = document.createElement("a") |
− | statusLink.setAttribute("href", "/wiki/Special:MyPage/status") | + | statusLink.setAttribute("href", "/wiki/Special:MyPage/status") |
− | statusLink.appendChild(document.createTextNode("Your Status")) | + | statusLink.appendChild(document.createTextNode("Your Status")) |
− | statusLI.appendChild(statusLink) | + | statusLI.appendChild(statusLink) |
− | const nEdit = document.getElementById("n-Edit") | + | const nEdit = document.getElementById("n-Edit") |
− | const parentBox = nEdit.parentNode | + | const parentBox = nEdit.parentNode |
parentBox.insertBefore(statusLI, nEdit) | parentBox.insertBefore(statusLI, nEdit) | ||
/* Removing some interwikis since I don't use them */ | /* Removing some interwikis since I don't use them */ | ||
− | document.querySelector('[aria-label="Scratch Wikis"]').remove() | + | document.querySelector('[aria-label="Scratch Wikis"]').remove() |
− | console.log('Loaded') | + | console.log('Loaded') |
Revision as of 05:19, 22 July 2022
/* Remove lang attribute from editor so the font is more readable (not having syntax highlight is enough) */ document.getElementById("wpTextbox1").removeAttribute("lang") /* Add semicolon */ const scDiv = document.createElement("div") const semicolon = document.createTextNode(" ;") scDiv.appendChild(semicolon) const notNav = document.getElementById("not-nav") notNav.appendChild(scDiv) /* Add status to left navbar */ const statusLI = document.createElement("li") statusLI.setAttribute("id", "n-Your-Status") const statusLink = document.createElement("a") statusLink.setAttribute("href", "/wiki/Special:MyPage/status") statusLink.appendChild(document.createTextNode("Your Status")) statusLI.appendChild(statusLink) const nEdit = document.getElementById("n-Edit") const parentBox = nEdit.parentNode parentBox.insertBefore(statusLI, nEdit) /* Removing some interwikis since I don't use them */ document.querySelector('[aria-label="Scratch Wikis"]').remove() console.log('Loaded')