MediaWiki:Common.js: diferenças entre revisões

Fonte: Manual HostSync.io
Saltar para a navegação Saltar para a pesquisa
Sem resumo de edição
Sem resumo de edição
Linha 17: Linha 17:
     if (mw.util.getParamValue('printable') === 'yes') {
     if (mw.util.getParamValue('printable') === 'yes') {
         // Look for the Codex warning message and remove it
         // 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();
            }
        });
    }
});
$(document).ready(function () {
    if (mw.util.getParamValue('printable') === 'yes') {
        document.body.classList.add('printable-page');
        // (optional: remove print warning too)
         $('.cdx-message--warning').each(function () {
         $('.cdx-message--warning').each(function () {
             if ($(this).text().includes('A versão imprimível já não suportada')) {
             if ($(this).text().includes('A versão imprimível já não suportada')) {

Revisão das 12h44min de 22 de abril de 2025

/* 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();
            }
        });
    }
});

$(document).ready(function () {
    if (mw.util.getParamValue('printable') === 'yes') {
        document.body.classList.add('printable-page');

        // (optional: remove print warning too)
        $('.cdx-message--warning').each(function () {
            if ($(this).text().includes('A versão imprimível já não suportada')) {
                $(this).remove();
            }
        });
    }
});