Difference between revisions 258415 and 258562 on ptwikibooks/** * TemplateScript * Adds a menu of configurable templates and scripts to the sidebar * @author: [[m:user:Pathoschild]] ([[meta:User:Pathoschild/Scripts/TemplateScript]]) * @update-token: [[File:pathoschild/templatescript.js]] * @author: [[User:Helder.wiki]] (this configuration file) * @tracking: [[Special:GlobalUsage/User:Helder.wiki/Tools/TemplateScript.js]] ([[File:User:Helder.wiki/Tools/TemplateScript.js]]) */ (contracted; show full) find: /https:\/\/secure\.wikimedia\.org\/(wiki(?:pedia|books|news|quote|source|versity)|wiktionary)\/([a-z]{2,3}|meta)/g, replace: '//$2.$1.org' }]; regex( context, list, '[[wmfblog:2011/10/03/native-https-support-enabled-for-all-wikimedia-foundation-wikis|http é inseguro]]' ); } function fixSignature( context ){ var useLocalUserPage = $.inArray( mw.config.get( 'wgDBname' ), [ 'ptwiki', 'enwiki' ] ) !== -1,⏎ proj = ( mw.config.get( 'wgServer' ).indexOf( 'wikibooks' ) > -1)!== -1 || useLocalUserPage ? '' : 'b:', lang = ( 'pt' === mw.config.get( 'wgContentLanguage' ) )|| useLocalUserPage ? '' : 'pt:', reOldSign, newSign; oldText = context.$target.val(); if ( !proj && lang ) { proj = ':'; } reOldSign = /\[\[(([^:]+:)?[^:]+:)?Us(er|uário):Heldergeovane\|('''|[)?Helder('''|])?(geovane)?\]\](\s*\(\[\[(Usuário Discussão|User talk):Heldergeovane\|.+?\]\]\))?/gi; newSign = '[[' + proj + lang + 'User:Helder.wiki|Helder]]'; regex( context, [{ find: reOldSign, replace: newSign }], 'Fixing links (my user account was renamed)' ); if ( useLocalUserPage ) { regex( context, [{ find: /\[\[b:(?:pt:)?User:Helder.wiki\|Helder\]\]/g, replace: newSign }], 'Fixing links (my user account was renamed)' ); } showDiff(); } function convertRefs( context ){ oldText = context.$target.val(); list = [{ find: /Mais informações sobre o livro\nTítulo\t([^\n]+)\nAutor\t([^\n]+)\s([^\n\s]+)\nEditora\t([^\n,]+)(?:,\s(\d+))?\nISBN\t([^\n,]+)(?:,\s\d+)?\nNum. págs.\t(\d+)[^\n]+/img, (contracted; show full) script: usingRegex }); } } $.getScript( '//pt.wikibooks.org/w/index.php?title=User:Helder.wiki/Tools/Pathoschild/TemplateScript.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400', loadMyRegexTools ); }( mediaWiki, jQuery ) ); 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=258562.
![]() ![]() 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.
|