Jump to content

User:Prtksxna/common.js: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
No edit summary
 
Line 1: Line 1:
/* IP Info */
mw.loader.load('/w/index.php?title=User:PSaxena_(WMF)/info.js&action=raw&ctype=text/javascript');
mw.loader.load('/w/index.php?title=User:PSaxena_(WMF)/info.css&action=raw&ctype=text/css', 'text/css');

/* Persistent TOC
/* 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.css' , 'text/css');

Latest revision as of 04:31, 9 July 2020

/* IP Info */
mw.loader.load('/w/index.php?title=User:PSaxena_(WMF)/info.js&action=raw&ctype=text/javascript');
mw.loader.load('/w/index.php?title=User:PSaxena_(WMF)/info.css&action=raw&ctype=text/css', 'text/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' );
} );