Difference between revisions 237600 and 237602 on ptwikibooks/** * Add a link to [[Special:RecentChanges]] indicating the current version of MW * @author: [[User:Helder.wiki]] * @tracking: [[Special:GlobalUsage/User:Helder.wiki/Tools/AddMediaWikiVersionLinkToRecentChanges.js]] ([[File:User:Helder.wiki/Tools/AddMediaWikiVersionLinkToRecentChanges.js]]) */ /*jslint browser: true, white: true, regexp: true*/ /*global jQuery, mediaWiki */ ( function ( $, mw ) { 'use strict'; function addMWVersion( data ){ if( !data.query ) { return; } var geral = data.query.general, curRev = geral['git-hash'], oldRev = $.cookie( 'mw-last-checked-rev' ) || String(undefined), // Last checked revision HTML = geral.generator + ':' + curRev.substr( 0, 7 ), branch = geral.generator.match( /MediaWiki (.+)/ )[ 1 ], $div = $( '<div id="my-mw-version"></div>' ), $versionLink = $( '<a>' + HTML + '</a>' ).attr( { 'href': 'https://gerrit.wikimedia.org/r/gitweb?p=mediawiki%2Fcore.git;a=shortlog;h=refs%2Fheads%2Fwmf%2F' + branch, 'class': 'updated', 'title': 'Ver as alterações recentes no branch /wmf/' + branch + '.' (contracted; show full) 'meta': 'siteinfo' }, { ok: addMWVersion } ); } ); } }( jQuery, mediaWiki ) ); All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://pt.wikibooks.org/w/index.php?diff=prev&oldid=237602.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|