Template:Appeal/FY2324 E3 XH/en: Difference between revisions

Content deleted Content added
No edit summary
Tag: Reverted
Prevent XSS attack using .textContent
 
(4 intermediate revisions by the same user not shown)
Line 49:
const urlParams = new URLSearchParams(window.location.search);
const firstName = urlParams.get("fname");
console.log(firstName);
if (firstName){
if(firstName !== 'Wikimedia Supporter'){
console.log("mpainw");
const capitalizedName = firstName.charAt(0).toUpperCase() + firstName.slice(1); //Capitalize name
document.getElementById('donor-greeting').innerHTMLtextContent = `${capitalizedName}, s`;
}
}
</script>