User:Cloudy176/global.js

// Opens all folders on enhanced recent changes var opensesame = function { if (wgPageName === "Special:RecentChanges" ) { array1 = document.getElementsByClassName("mw-made-collapsible"); for (i = 0; i < array1.length; i++) { tb = array1[i]; array2 = tb.children[0].children; for (j = 1; j < array2.length; j++) { array2[j].style.display = "table-row"; }       }    } };

var commentMover = function(destination) { if(wgCanonicalSpecialPageName === "Prefixindex") { if(!wgPageName.endsWith("/")) { console.log("Page URL should end with /"); return; }       originalBaseName = wgPageName.replace("Special:PrefixIndex/", ""); tds = document.getElementById("mw-prefixindex-list-table").getElementsByTagName("td"); prevUrl = null; for(i = 0; i < tds.length; i++) { url = tds[i].firstChild.href; if(prevUrl === null || !url.startsWith(prevUrl)) { prevUrl = url; commentPart = url.replace(wgServer + "/wiki/" + originalBaseName, ""); newUrl = wgServer + "/wiki/Special:MovePage/" + originalBaseName + commentPart; newUrl += "?wpNewTitle=" + destination + "/" + commentPart + "&wpLeaveRedirect=0&wpMovesubpages=1"; newUrl += "&wpReason=Moving%20comments%20not%20moved%20by%20FANDOMbot"; console.log(newUrl); }       }    } };