User:Lost Labyrinth/QReportRemoval.js
Jump to navigation
Jump to search
Important note on account security
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with
importScript
or iusc
, take note that this causes you to dynamically load a remote script, which could be changed by others. The code will be executed when you preview this page.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
- Edge: Press Ctrl-Shift-Del, select Cached data and files, and click Clear
- Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
/* This script is still being tested and is not perfect. Anyone is welcome to make changes to repair. Reports can still be removed manually. */
window.onload = function () {
// This is an imported script and still not perfect. wgPageQuery caused the script to not work at all. (I didn't understand the "cake" part either)
/*var cake = (unescape(Query));
if (cake.indexOf("remove=") > 0) {
var mhm = cake.substring(unescape(Query).indexOf("remove=") + 7, cake.indexOf("§ion=1"));
var oldtext = document.getElementById('wpTextbox1').value;
if (oldtext.indexOf("{{Report|" + mhm) > 0) {
var cake = oldtext.substring(oldtext.indexOf("{{Report|" + mhm));
var cak3 = cake.substring(0, cake.indexOf("}}") + 2);
document.getElementById('wpTextbox1').value = oldtext.replace(cak3, "{{Report|Example}}");
document.editform.wpSave.click();
}
}*/
}