User:DTankersley (WMF)/common.js

/* Simple user script examples to demonstrate the use of ResourceLoader core modules: https://www.mediawiki.org/wiki/ResourceLoader/Core_modules */

// Example 1: Use of jQuery function to make article font size bigger // Uncomment this $('body').css('font-size', '1.5em');

// Example 2: Use of `mw.config` & `mw.notify` module to send in a notification // for groups a user is a part of // Uncomment this mw.notify(mw.config.get('wgUserGroups'));

// Example 3: Use of `mw.now` module and jQuery function to fetch the date and // display it beneath the article title // Uncomment this $('#bodyContent').prepend(new Date(mw.now));

// Example 4: User script to calculate and display estimated reading time of an // article // Uncomment this var words = $('#bodyContent').text.split(' ').length, // Uncomment this 	avgSpeed = Math.round(words / 250); // Uncomment this $('#firstHeading').append(" (" + avgSpeed + " min" + " read) ");