Revision 236986 of "Utilizador:Helder.wiki/Tools/PermalinkWhenExpandingTemplates.js" on ptwikibooks/**
* Add a permanent link to [[Special:ExpandTemplates]]
* @author: [[User:Helder.wiki]]
* @tracking: [[Special:GlobalUsage/User:Helder.wiki/Tools/PermalinkWhenExpandingTemplates.js]] ([[File:User:Helder.wiki/Tools/PermalinkWhenExpandingTemplates.js]])
*/
/*jslint browser: true, white: true*/
/*global jQuery, mediaWiki */
( function ( $, mw /* , undefined */ ) {
'use strict';
var addPermaLink = function () {
var param = {
'input': $('#input').val(),
'contexttitle': $.trim( $('#contexttitle').val() )
};
if ($('#removecomments').is(':checked')) {
param.removecomments = true;
}
if ($('#removenowiki').is(':checked')) {
param.removenowiki = true;
}
if ($('#generate_xml').is(':checked')) {
param.generate_xml = true;
}
$('legend').append(' (<a href="' +
mw.util.wikiGetlink('Special:ExpandTemplates') +
'?' + $.param(param) +
'">link permanente para o teste atual</a>)');
};
if (mw.config.get('wgCanonicalSpecialPageName') === 'ExpandTemplates') {
$(addPermaLink);
}
}( 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?oldid=236986.
![]() ![]() 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.
|