Template:Appeal/FY2324 E3 XH/en: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
No edit summary |
Prevent XSS attack using .textContent |
||
(11 intermediate revisions by the same user not shown) | |||
Line 42: | Line 42: | ||
<div class="appeal-layout"> |
<div class="appeal-layout"> |
||
<div class="appeal-text"> |
<div class="appeal-text"> |
||
<p class="headline"> |
<p class="headline"><span id="donor-greeting">S</span>upport Wikipedia, your daily source of trusted knowledge.</p> |
||
<p class="paragraph">Your support matters! Sustain this great fountain of knowledge built by people, for people. Keep Wikipedia thriving.</p> |
<p class="paragraph">Your support matters! Sustain this great fountain of knowledge built by people, for people. Keep Wikipedia thriving.</p> |
||
</div> |
</div> |
||
</div> |
</div> |
||
<script> |
<script> |
||
// Get the URL parameters from the current URL |
|||
const urlParams = new URLSearchParams(window.location.search); |
const urlParams = new URLSearchParams(window.location.search); |
||
⚫ | |||
if (firstName){ |
|||
// Check if the "fname" parameter exists |
|||
if(firstName !== 'Wikimedia Supporter'){ |
|||
if (urlParams.has("fname")) { |
|||
const capitalizedName = firstName.charAt(0).toUpperCase() + firstName.slice(1); //Capitalize name |
|||
// If it exists, assign its value to a variable |
|||
document.getElementById('donor-greeting').textContent = `${capitalizedName}, s`; |
|||
⚫ | |||
⚫ | |||
console.log("fname parameter exists, and its value is: " + fnameValue); |
|||
⚫ | |||
console.log("fname parameter does not exist in the URL."); |
|||
} |
} |
||
</script> |
</script> |
Latest revision as of 00:50, 4 November 2023
Support Wikipedia, your daily source of trusted knowledge.
Your support matters! Sustain this great fountain of knowledge built by people, for people. Keep Wikipedia thriving.