User:Eavanxing/prove test.js

(function {   'use strict';

window.onload = function { const proveButton = document.createElement('button'); proveButton.innerText = 'Prove'; proveButton.style.margin = '10px'; proveButton.style.cursor = 'pointer';

const descriptionSpan = document.createElement('span'); descriptionSpan.innerText = 'This is a description.'; descriptionSpan.style.display = 'none'; descriptionSpan.style.marginLeft = '10px'; descriptionSpan.style.cursor = 'pointer';

proveButton.onclick = function { if (descriptionSpan.style.display === 'none') { descriptionSpan.style.display = 'inline'; } else { descriptionSpan.style.display = 'none'; }       };

descriptionSpan.onclick = function { descriptionSpan.style.display = 'none'; };

const firstHeading = document.getElementById('firstHeading'); const langBtn = document.getElementById('p-lang-btn');

if (firstHeading && langBtn) { firstHeading.parentNode.insertBefore(proveButton, langBtn); firstHeading.parentNode.insertBefore(descriptionSpan, langBtn); }   }; });