User:Suffusion of Yellow/AnonSettings.js
Appearance
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", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
![]() | This user script seems to have a documentation page at User:Suffusion of Yellow/AnonSettings. |
// DO NOT INSTALL THIS IN YOUR common.js!
(function() {
if (!("serviceWorker" in navigator)) {
alert("Unsupported browser or settings.");
return;
}
if (window.location.host !== "wiki.riteme.site") {
alert("AnonSettings is only supported on the English Wikipedia desktop site.");
return;
}
if (mw.config.get('wgUserId') !== null) {
alert("AnonSettings is not intended for logged-in use. Please log out.");
return;
}
if (!confirm("You are about to install AnonSettings. This script is experimental and may disrupt your ability to use this site. It is not recommended for logged-in use. Be sure you have read the uninstallation instructions."))
return;
navigator.serviceWorker.register("/?title=User:Suffusion_of_Yellow/AnonSettings/sw.js&action=raw&ctype=text/javascript")
.then(() => {
mw.notify("AnonSettings installed. Redirecting to configuration page...");
setTimeout(() => window.location = "/wiki/User:Suffusion_of_Yellow/AnonSettings/Setup", 3000);
})
.catch(e => alert("AnonSettings setup failed: " + e));
})();
// DO NOT INSTALL THIS IN YOUR common.js!