User:Guywan/Scripts/ConfirmLogout
| Confirm Logout | |
|---|---|
| Description | Provides a HTML prompt to confirm a logout. |
| Author | Guywan |
| Status | Beta |
| First released | March 21, 2020 |
| Version | 22.03.20 |
| Updated | March 22, 2020 |
| Skins | |
| Source | User:Guywan/Scripts/ConfirmLogout.js |
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:
Customisation
The following attributes allow you to customise the logout prompt. Note: both the prompt and the buttons are affected by these.
| Attribute | Comments | Defaults |
window.us_conlog_font-weight |
"bold" or "normal". |
"bold"
|
window.us_conlog_font-size |
"86%"
| |
window.us_conlog_background |
Named colour or hex code, e.g. "honeydew". |
"#FFDBDB"
|
window.us_conlog_color |
Same as above. | "#000"
|
window.us_conlog_border |
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 User:Guywan/Scripts/ConfirmLogout.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.
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.