MediaWiki:Common.js

Fonte: Manual HostSync.io
Revisão em 11h26min de 22 de abril de 2025 por Iurirosa (discussão | contribs)
Saltar para a navegação Saltar para a pesquisa

Nota: Depois de publicar, poderá ter de contornar a cache do seu navegador para ver as alterações.

  • Firefox / Safari: Pressione Shift enquanto clica Recarregar, ou pressione Ctrl-F5 ou Ctrl-R (⌘-R no Mac)
  • Google Chrome: Pressione Ctrl-Shift-R (⌘-Shift-R no Mac)
  • Edge: Pressione Ctrl enquanto clica Recarregar, ou pressione Ctrl-F5.
/* Código Javascript colocado aqui será carregado para todos os utilizadores em cada carregamento de página */
$(document).ready(function () {
    if (mw.util.getParamValue('printable') === 'yes') {
        document.body.classList.add('printable-page');
    }
});

$(document).ready(function () {
    // Check if we are in printable mode
    if (mw.util.getParamValue('printable') === 'yes') {
        // Remove the print-disabled warning if present
        $('.mw-print-disabled').remove();
    }
});

$(document).ready(function () {
    if (mw.util.getParamValue('printable') === 'yes') {
        // Look for the Codex warning message and remove it
        $('.cdx-message--warning').each(function () {
            if ($(this).text().includes('A versão imprimível já não suportada')) {
                $(this).remove();
            }
        });
    }
});