MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 50: Line 50:


/* ======================================= template:Top ======================================= */
/* ======================================= template:Top ======================================= */
document.getElementById('custom-tooltip').addEventListener('click', closeTooltip);  
if (document.getElementById('custom-tooltip')) {
document.getElementById('custom-tooltip').addEventListener('click', closeTooltip);  
}


function closeTooltip() {
function closeTooltip() {
Line 57: Line 59:


/* ======================================= template:Print Button ======================================= */
/* ======================================= template:Print Button ======================================= */
document.getElementById('print-button').addEventListener('click', customPrint);  
if (document.getElementById('print-button')) {
document.getElementById('print-button').addEventListener('click', customPrint);  
}


function customPrint() {
function customPrint() {