User:Prtksxna/common.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. |
![]() | The accompanying .css page for this skin is at User:Prtksxna/common.css. |
/* Persistent TOC
mw.loader.load('https://rawgit.com/prtksxna/persistent-toc/master/ptoc.css' , 'text/css');
mw.loader.load('https://rawgit.com/prtksxna/persistent-toc/master/ptoc.js' , 'text/javascript');
*/
/* History experiment
mw.loader.load('/w/index.php?title=User:Prtksxna/history.js&action=raw&ctype=text/javascript');
mw.loader.load('/w/index.php?title=User:Prtksxna/history.css&action=raw&ctype=text/css', 'text/css');
*/
// mw.loader.load('/w/index.php?title=User:Prtksxna/jade-test.js&action=raw&ctype=text/javascript');
// mw.loader.load('/w/index.php?title=User:Prtksxna/a11y.js&action=raw&ctype=text/javascript');
// Testing for User reporting system
// mw.loader.load('/w/index.php?title=User:PSaxena_(WMF)/common.js&action=raw&ctype=text/javascript');
//importStylesheet('User:Magnus Manske/explosion.css');
/* Reading time
$( '#firstHeading' )
.append(
$( '<small>' )
.text(
" (" +
Math.round(
$( '#mw-content-text p' )
.text()
.split(" ")
.length / 225
)
+ " minutes)"
)
) */
// Show EventLogging validation errors in a dismissible bar at the top of page.
var $el = $( '<pre style="background: yellow; margin: 0; padding: 8px; position: fixed; top: 0; width: 100%; z-index: 99"></pre>' );
$el.click( function () { $el.empty().detach(); } );
mw.trackSubscribe( 'eventlogging.error', function ( topic, err ) {
$el.text( function ( idx, text ) {
return ( text && text + '\n' ) + err;
} ).appendTo( 'body' );
} );