User:Svip/monobook.js

function updateDonationNotice { if(!document.getElementById("donation-progress-number")) return; var number = document.getElementById("donation-progress-number"); var bar = document.getElementById("donation-progress-indicator"); var barWidth = 200; var topAmount = 500; var currentAmount = 10; var nowWidth = (currentAmount/topAmount)*barWidth; number.innerHTML = number; bar.style.width = nowWidth + "px"; }

addOnloadHook(updateDonationNotice);