This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- SalsaStaff 365924: BEGIN delete the payment option fieldset that holds the PayPal payment option. --> | |
<script type="text/javascript"> | |
document.addEventListener("DOMContentLoaded", () => { | |
// select the target node | |
var target = document.querySelector("#salsa"); | |
// create an observer instance | |
var observer = new MutationObserver(function (mutations) { | |
mutations.forEach(function (mutation) { | |
console.log(mutation.type); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
// SalsaScript to check if the supporter is logged in. If so, | |
// it deposits the script that populates/appends the Country field. | |
(function() { | |
var country = null; | |
if (Supporter == null) { return; } | |
country = Supporter.get("Country"); | |
country = (country == null) ? "US" : country; | |
?> | |
<!-- BEGIN Supply/fill country field on Welcome Back pages. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
document.addEventListener("DOMContentLoaded", function() { | |
var e = document.querySelector("#calendarButtons"); | |
if (e != null) { | |
e.style.display = "none"; | |
} | |
}) | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Put this text on a new line just after the <script> tag (https://prnt.sc/t4j44d). | |
var isThankYouPage = document.location.href.indexOf("thank_you") != -1; | |
var hasDonationKEY = /donate_page_KEY=\d+/.test(document.location.href); | |
var hasAmount = /amount=\d+/.test(document.location.href); | |
if (isThankYouPage && hasDonationKey && hasAmount) { | |
// Put this text just before the </script> tag (https://prnt.sc/t4j4il). | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- BEGIN Change displayed names for selected countries. --> | |
<script type="text/javascript"> | |
(function() { | |
// This object maps country abbreviations to text. | |
// - The keys are ISO-3166 Alpha 2 abbreviations for countries. | |
// - The values are the countries names to display. | |
// You can find the abbreviations by viewing the HTML source | |
// of any page that has a country field. | |
countries = { | |
"LY": "Libya", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
// Script to move the last name before the first name on a donation page. | |
// Only run this script on donation pages. This should work for both | |
// regular pages and pages with a Salsa shortcut. | |
if (window.location.href.indexOf('/salsa/donation/') != -1) { | |
// Wait for the page to be loaded. | |
$(document).ready(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- BEGIN Change non-secure action URLs to secure. --> | |
<script type="text/javascript"> | |
if (/^http:/.test(window.location.href)) { | |
window.location.href = window.location.href.replace('http', 'https'); | |
} | |
</script> | |
<!-- END Change non-secure action URLs to secure. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- BEGIN Script to remove the city and state from petitions. | |
To remove cities and states from the petition, add the following HTML to the petition header. | |
<div style="display: none;" id="remove-petition-cities-and-states"></div> | |
To restore cities and states to a petition, remove the HTML. | |
--> | |
<script type="text/javascript"> | |
(function($) { | |
$(function() { | |
var e = $('#remove-petition-cities-and-states'); | |
if (e.length == 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
(function($) { | |
$(document).ready(function() { | |
if (window.location.href.indexOf('event_KEY=89503') != -1) { | |
var e = $('#regForm2 > strong:nth-child(21)'); | |
if (e.length > 0) { | |
e.html('Add me to the email subscriptions below to be notified of important alerts:'); | |
} | |
} | |
}); |