JavaScript gadget – remind and augment error messages in page:
Error messages are created by templates or sometimes by MediaWiki components and contain a class="error"
assignment.
Additionally, hidden categories may be shown in page head since many but not all of them indicate maintenance needs.
mw.loader.load( "https://en.wikipedia.org/?title=User:PerfektesChaos/js/remindErrorMessages/r.js&action=raw&bcache=1&maxage=604800&ctype=text/javascript",
"text/javascript" );
The appearance might be changed via CSS on two ways.
The following lines may be inserted into your common.css, global.css or skin dependant CSS. Any attribute value may be applied.
/* every single message */
.remindErrorMessages_msg {
background: #FF4040 ! important;
}
/* box on top of content */
#remindErrorMessages_box {
background: #FFFF80 ! important;
}
/* button on source text editing */
#remindErrorMessages_attention {
border: #FFFF00 2px solid ! important;
}
Another approach is to influence code generation directly as follows:
{ ...: ... }
may be an object equipped with assignments of CSS properties and values.if ( typeof mw.libs.remindErrorMessages !== "object" ) {
mw.libs.remindErrorMessages = { };
}
// button on source text editing
mw.libs.remindErrorMessages.barCSS = { ...: ... };
// every single element
mw.libs.remindErrorMessages.barkCSS = { ...: ... };
// box on top of content
mw.libs.remindErrorMessages.boxCSS = { ...: ... };
It should appear on your
common.js,
global.js or skin dependant JS best before an mw.loader.load()
call as described in “
Usage” section.
Hidden categories may be shown in page head since many but not all of them indicate maintenance needs.
The following lines could be included into your common.js, global.js etc., best before loading the gadget:
if ( typeof mw.libs.remindErrorMessages !== "object" ) {
mw.libs.remindErrorMessages = { };
}
mw.libs.remindErrorMessages.hiddencats = true;
This gadget is prepared for bidirectional support.
Text to be translated is not used.
Source code |
|
ResourceLoader |
|
Namespaces |
|
mw.libs
|
remindErrorMessages
|
JavaScript gadget – remind and augment error messages in page:
Error messages are created by templates or sometimes by MediaWiki components and contain a class="error"
assignment.
Additionally, hidden categories may be shown in page head since many but not all of them indicate maintenance needs.
mw.loader.load( "https://en.wikipedia.org/?title=User:PerfektesChaos/js/remindErrorMessages/r.js&action=raw&bcache=1&maxage=604800&ctype=text/javascript",
"text/javascript" );
The appearance might be changed via CSS on two ways.
The following lines may be inserted into your common.css, global.css or skin dependant CSS. Any attribute value may be applied.
/* every single message */
.remindErrorMessages_msg {
background: #FF4040 ! important;
}
/* box on top of content */
#remindErrorMessages_box {
background: #FFFF80 ! important;
}
/* button on source text editing */
#remindErrorMessages_attention {
border: #FFFF00 2px solid ! important;
}
Another approach is to influence code generation directly as follows:
{ ...: ... }
may be an object equipped with assignments of CSS properties and values.if ( typeof mw.libs.remindErrorMessages !== "object" ) {
mw.libs.remindErrorMessages = { };
}
// button on source text editing
mw.libs.remindErrorMessages.barCSS = { ...: ... };
// every single element
mw.libs.remindErrorMessages.barkCSS = { ...: ... };
// box on top of content
mw.libs.remindErrorMessages.boxCSS = { ...: ... };
It should appear on your
common.js,
global.js or skin dependant JS best before an mw.loader.load()
call as described in “
Usage” section.
Hidden categories may be shown in page head since many but not all of them indicate maintenance needs.
The following lines could be included into your common.js, global.js etc., best before loading the gadget:
if ( typeof mw.libs.remindErrorMessages !== "object" ) {
mw.libs.remindErrorMessages = { };
}
mw.libs.remindErrorMessages.hiddencats = true;
This gadget is prepared for bidirectional support.
Text to be translated is not used.
Source code |
|
ResourceLoader |
|
Namespaces |
|
mw.libs
|
remindErrorMessages
|