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 newspaper URLs to links in the LTE paper selection grid. --> | |
<script type="text/javascript"> | |
document.addEventListener("DOMContentLoaded", () => { | |
var isLetter = RegExp("letter/.*letter_KEY=\\d+").test(window.location.href); | |
var hasPapers = document.querySelector("div.address") != null; | |
if (isLetter && hasPapers) { | |
Array.from(document.querySelectorAll("div.address")) | |
.forEach((e) => { | |
var t = e.innerHTML | |
var a = e.innerHTML.split("\t").join("").split("\n").join("").split("<br>") |
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 hide optional groups prompt when there are no optional groups. --> | |
<script type="text/javascript"> | |
document.addEventListener("DOMContentLoaded", () => { | |
var e = document.querySelector("#salsa-optional-groups-header") | |
if (e != null) { | |
var f = document.querySelectorAll("li.salsa-optional-group") | |
if (f.length == 0) { | |
e.style.display = "None" | |
} | |
} |
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 Clean up In Honor Of and in Memory Of fields on donation pages. --> | |
<!-- See: https://gist.github.com/salsalabs/120d0cd6b476242bf7d7cd79ddbacd8e --> | |
<style type="text/css"> | |
/* Force label to appear before In_Honor_Address. */ | |
label[for=In_Honor_Address], | |
*[name=In_Honor_Address] { | |
float: left; | |
} | |
/* SalsaStaff 386297: Make the "In Memory Of" prompt easier to read. */ | |
#honorof > p:nth-child(6) { |
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 373827: BEGIN Position privacy statement below submit button. --> | |
<div class="formRow" id="post-submit"> | |
Roots Action considers your contact information to be private and confidential. We will NOT disclose it to any other | |
entity unless you specifically authorize us to do so. You can read our privacy policy in its entirety | |
<a href="http://www.rootsaction.org/privacy-policy"> here</a>. | |
</div> | |
<script type="text/javascript"> | |
$(document).ready(() => { | |
var diaFields = $('input[name=Email]').parent().parent(); | |
var submit = $('#submitSignup'); |
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 SalsaStaff 366219: Put a fieldset containing "nn-nn years old" optional groups after the Organization field in a | |
Salsa Classic form. The optional groups are all of subgroups to the "Age Groups" group. | |
The age group box will apppear on any page that has | |
1. "An Organization" field. | |
2. This special html. | |
<div style="display: none;" id="show-age-group-box"></div> |
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
<!-- BEGIN Change credit card expiration date year to start with the current year. --> | |
$(document).ready(() => { | |
const years = 20; | |
var e = $('select[name=ccExpYear]'); | |
if (e.length == 0) { | |
return; | |
} | |
$('option', e).remove(); | |
e.append('<option value="">Year</option>') | |
var thisYear = new Date().getFullYear(); |
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> |
NewerOlder