User:Volcanooo456/timer.js

(function {

'use strict';

// Add a link to the "tools" section of Wikipedia

var toolsSection = document.getElementById('p-tb');

var link = document.createElement('a');

link.href = '#';

link.textContent = 'Start Timer';

link.addEventListener('click', function(event) {

event.preventDefault;

var time = prompt('Enter the time for the timer (in seconds):');

if (time) {

setTimeout(function {

alert('Timer finished!');

}, time * 1000);

}

});

toolsSection.appendChild(link);

});