Difference between revisions 261741 and 261746 on ptwikibooks{{P|Exemplo 1}} {{P|Exemplo 2}} {{P|Exemplo 3}}/*jshint strict:false*/ /*global mw, $, importScript, importStylesheet*/ /** * Parâmetros &withJS= e &withCSS= para poder usar códigos CSS e JS * sem editar os arquivos .js e .css pessoais * @source: [[w:en:MediaWiki:Common.js]] */ var extraCSS = mw.util.getParamValue("withCSS"); if ( extraCSS && extraCSS.match(/^MediaWiki:[^&<>=%]*\.css$/) ) { importStylesheet(extraCSS); } var extraJS = mw.util.getParamValue('withJS'); if (extraJS && extraJS.match(/^MediaWiki:[^&<>=%]*\.js$/)) { // TODO: Usar mw.loader quando o [[bugzilla:25845]] for resolvido importScript(extraJS); } /** * Variável global para uso em scripts que lidam com o nome dos livros * @source: [[:en:MediaWiki:Gadget-predef.js]] * @author: [[:en:User:Whiteknight]] * @author: [[User:Helder.wiki]] * @example: 'A:B:C:D/E:F:G:H/I:J:K:L' -> 'A:B:C:D' -> 'A:B' * @see: [[MediaWiki:Gadget-Common.js]] (alterações deste código devem ser duplicadas lá, para que seja usada pelos Gadgets) */ mw.config.set('wgBookName', mw.config.get('wgPageName').split('/', 1)[0] || mw.config.get('wgPageName')); mw.config.set('wgBookName', mw.config.get('wgBookName').split(':', 2).join(':')); /** * Script para a [[Predefinição:P]] */ $(function(){ var $panels = $('.panel').hide(); $('.flip') .attr( 'title', 'Ver detalhes' ) .click(function (e) { e.preventDefault(); $panels.slideToggle('slow'); }); }); // [[Categoria:Scripts do Wikilivros|Common.js]] 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=261746.
![]() ![]() 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.
|