forked from aaronlifshin/homepage_redesign
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththanks_dna.html
74 lines (53 loc) · 2.38 KB
/
thanks_dna.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
layout: default
title: MAYDAY.US - Do Not Ask Confirmation Page
omit_title_suffix: true
cssid: thanks_dna
---
{% capture subhead %}
{% endcapture %}
{% capture pageid %}
Do Not Ask Confirmation
{% endcapture %}
{% capture content %}
Thank you! Don't worry, we know how annoying those e-mails asking for money can be and we won't send you any more of them.
We'll just keep you updated with news and events as the campaign continues towards election day.
We're eager to see how this experiment works - and if you like it, feel free to <a href="https://twitter.com/home?status=%23MaydayPAC%20just%20asked%20me%20if%20I%20wanted%20to%20opt-out%20of%20fundraising%20emails.%20(Wish%20more%20political%20groups%20would%20do%20that.)%20http://goo.gl/ar6VoM">share on Twitter!</a>
If you want, you can [head here to make one last contribution](/newpledge), or come back to our website and find any of the big red Donate buttons. (We know, it's a bit tacky, but it does help, honest.)
{% endcapture %}
{% include subpage.html %}
<script>
function post_to_url(path, params, method) {
method = method || "POST"; // Set method to post by default, if not specified.
// The rest of this code assumes you are not using a library.
// It can be made less wordy if you use one.
var form = document.createElement("form");
form.setAttribute("method", method);
form.setAttribute("action", path);
for (var key in params) {
if (params.hasOwnProperty(key)) {
var hiddenField = document.createElement("input");
hiddenField.setAttribute("type", "hidden");
hiddenField.setAttribute("name", key);
hiddenField.setAttribute("value", params[key]);
form.appendChild(hiddenField);
}
}
document.body.appendChild(form);
form.submit();
}
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
$(document).ready( function() {
var emailToUnsub = getParameterByName('unsub') || null;
if (emailToUnsub) {
var params = {'email':emailToUnsub, 'MERGE13':'No', 'redirect':'https://mayday.us/thanks_dna/'};
post_to_url("https://pledge.mayday.us/r/subscribe", params);
// $('#emailAddress').text('(At ' + email + ')');
}
});
</script>