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:'); | |
} | |
} | |
}); |
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
//Wait for suggestion links on a submit a request page. Called after DOM is loaded. | |
function modifySuggestionLinks() { | |
if (!RegExp('/requests(/new)*$').test(window.location.href)) { | |
return | |
} | |
const target = document.querySelector('div.suggestion-list'); | |
if (target == null) { | |
return | |
} | |
//Create and configure a mutuation observer. Observe changes in div.suggestion-list's structure. |
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 Hide/show parts of the action header based on the workflow step being viewed. --> | |
<script type="text/javascript"> | |
// NOTE: The basis for this script is described in exquisite detail on this page: | |
// https://gist.github.com/salsalabs/fa7cdd9d27f955bdc10e9cbac522cec5 | |
// The body of the script is copied as-is. The only real changes are modify() | |
// and the parameters to waitForElement. | |
(() => { | |
// Function to change an element on a targeted action page. | |
// | |
// If the current page is not a targeted action, then the desired element already appears on |
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: Replace the credit card year dropdown with a current list of years. --> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
var e = $('select[name="ccExpYear"]'); | |
if (e.length != 0) { | |
$("option", e).remove(); | |
e.append("<option>Year</option>"); | |
var year = new Date().getFullYear(); | |
for (var i = 0; i < 16; i++) { | |
var v = year + i; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<title>Mules</title> |