User:Guywan/Scripts/ConfirmLogout
__NOTOC__
type = comment
hidden = yes
default = {{TALKPAGENAME}}
buttonlabel = Bug report or feature request?
{{infobox user script
| name = Confirm Logout
| desc = Provides a HTML prompt to confirm a logout.
| author = Guywan
| updated = {{start date and age|2020|03|22}}
| released = {{start date and age|2020|03|21}}
| status = Beta
| version = 22.03.20
| source = User:Guywan/Scripts/ConfirmLogout.js
| skins = {{aye}} All skins supported.
| styled = yes
}}
Confirm Logout
If you click on a logout link, Confirm Logout provides an HTML prompt that asks for confirmation. The prompt may be customised to a certain extent. If you would like further customisation, you may make a copy of this script (and please add a backlink). With default settings, here is what it looks like:
NoLog out
= Customisation =
The following attributes allow you to customise the logout prompt. Note: both the prompt and the buttons are affected by these.
align = "center"
| Attribute | Comments | Defaults |
"bold" or "normal" . | "bold" | |
"86%" | ||
Named colour or hex code, e.g. "honeydew" . | "#FFDBDB" | |
Same as above. | "#000" | |
Border width, type, and colour. | "2px solid #BB7070" |
Set these attributes wherever you're importing the script, e.g:
window.us_conlog_color = "red";
mw.loader.getScript( ... ); // ConfirmLogout
= Installation =
Hint: It's much easier if you get ScriptInstaller, then navigate to {{FULLPAGENAME}}.js and click "Install" at the top.
To use this script, add the following to your common.js
(or other):
mw.loader.getScript("/w/index.php?title=User:Guywan/Scripts/ConfirmLogout.js&action=raw&ctype=text/javascript"); // Backlink: User:Guywan/Scripts/ConfirmLogout.js
= Credits =
- Remixed from m:User:Bluedeck/source/confirm-logout.js.