/** * * @source: https://github.com/fightforthefuture * * @licstart The following is the entire license notice for the * JavaScript code in this page. * * Copyright (C) Fight for the Future * * * The JavaScript code in this page is free software: you can * redistribute it and/or modify it under the terms of the GNU * General Public License (GNU GPL) as published by the Free Software * Foundation, either version 3 of the License, or (at your option) * any later version. The code is distributed WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU GPL for more details. * * As additional permission under GNU GPL version 3 section 7, you * may distribute non-source (e.g., minimized or compacted) forms of * that code without the copy of the GNU GPL normally required by * section 4, provided you include this license notice and a URL * through which recipients can access the Corresponding Source. * * @licend The above is the entire license notice * for the JavaScript code in this page. * */ !function(a,b){"use strict";function c(a){"Escape"!==a.code&&27!==a.which||(d(),b.removeEventListener("keyup",c))}function d(){var c=a.getElementsByClassName("overlay")[0],d=a.getElementsByClassName("modal-content")[0];c.classList.remove("visible"),d.classList.remove("visible"),a.querySelector("body").classList.remove("modal-present"),b.setTimeout(function(){for(;d.firstChild;)d.removeChild(d.firstChild);d.remove(),c.remove()},420)}function e(e){var f,g,h=e.contents,i=a.getElementsByTagName("body")[0],j=a.createElement("div"),k=a.createElement("div");if("object"!=typeof h)return!1;for(void 0===h.length&&(h=[h]),j.classList.add("overlay"),k.classList.add("modal-content","visible"),e.noFrame&&k.classList.add("no-frame"),e.disableOverlayClick||(g=a.createElement("button"),g.classList.add("close-modal"),g.textContent="×",k.appendChild(g),g.addEventListener("click",d),j.addEventListener("click",d)),f=0;f-1?(d.textContent="You're all set!",f.innerHTML='

1. Dont forget to grab your ticket:


(We also sent a copy to your email.)
',e.textContent="2. Can you help spread the word?"):window.location.href.indexOf("portland")>-1?(d.textContent="You're all set!",f.innerHTML='

1. Dont forget to grab your ticket:


(We also sent a copy to your email.)
',e.textContent="2. Can you help spread the word?"):window.location.href.indexOf("san-francisco")>-1?(d.textContent="You're all set!",f.innerHTML='

1. Dont forget to grab your ticket:


(We also sent a copy to your email.)
',e.textContent="2. Can you help spread the word?"):window.location.href.indexOf("boston")>-1?(d.textContent="You're all set!",f.innerHTML='

1. Dont forget to grab your ticket:


(We also sent a copy to your email.)
',e.textContent="2. Can you help spread the word?"):window.location.href.indexOf("pittsburgh")>-1?(d.textContent="You're all set!",f.innerHTML='

1. Dont forget to grab your ticket:


(We also sent a copy to your email.)
',e.textContent="2. Can you help spread the word?"):window.location.href.indexOf("washington")>-1?(d.textContent="You're all set!",f.innerHTML='

1. Dont forget to grab your ticket:


(We also sent a copy to your email.)
',e.textContent="2. Can you help spread the word?"):(d.textContent="You're all set! We sent you an email.",e.textContent="Now can you help spread the word?"),g.classList.add("share-icons"),g.appendChild(k),g.appendChild(l),i.innerHTML='…or, chip in $5 to help us spread the message.',j.textContent="Thanks for signing!",j.classList.add("thanks"),c.appendChild(d),c.appendChild(f),c.appendChild(e),c.appendChild(g),m&&(m.classList.add("visible"),c.appendChild(m)),c.appendChild(i),h.commit.removeAttribute("disabled"),b.modals.generateModal({contents:c}),h.parentNode.insertBefore(j,h)}function f(){h.reset(),a.getElementById("form-phone_number").setAttribute("value","All set!"),a.getElementById("form-phone_number").setAttribute("disabled",!0),a.getElementById("submit-phone").setAttribute("disabled",!0)}function g(g){function i(c){b.modals.dismissModal();var d=c||{},e=a.createElement("div"),f=a.createElement("h2"),g=a.createElement("p");f.textContent="Something went wrong",d.type?g.textContent="There seems to be a problem somewhere in between your computer and our server. Might not be a bad idea to give it another try.":d.status?g.textContent='(the nerdy info is that the server returned a status of "'+d.status+'" and said "'+d.statusText+'".)':g.textContent="this seems to be a weird error. the nerds have been alerted.",e.appendChild(f),e.appendChild(g),h.commit.removeAttribute("disabled"),b.modals.generateModal({contents:e})}function j(){k.status>=200&&k.status<400?h["member[phone_number]"]&&""!==h["member[phone_number]"].value?f():e():i(k)}g.preventDefault();var k=new XMLHttpRequest;""!==h["signature[zip_code]"].value&&(h["member[phone_number]"]&&""!==h["member[phone_number]"].value||c(),k.open("POST","https://queue.fightforthefuture.org/action",!0),k.addEventListener("error",i),k.addEventListener("load",j),k.send(d()))}var h=a.getElementById("action-network-form")||a.createElement("div");h.addEventListener("submit",g)}(document,window),function(a,b){var c=a.getElementById("nav-items"),d=0;b.addEventListener("scroll",function(){var a=b.scrollY;a0&&c.classList.contains("scrolled")?c.classList.add("stuck"):c.classList.remove("stuck","scrolled"):(c.classList.remove("stuck"),a>c.clientHeight&&c.classList.add("scrolled")),d=a})}(document,window),function(a,b){function c(a){a.target.playVideo()}function d(){f.appendChild(h),b.videoObject=new YT.Player("yt-video",{height:"360",width:"640",videoId:"kA9nIeVvcMw",playerVars:{rel:0},showinfo:0,events:{onReady:c}}),b.modals.generateModal({contents:[h,i],noFrame:!0}),h.classList.remove("hidden")}var e=encodeURIComponent("https://youtube.com/watch?v=kA9nIeVvcMw"),f=a.querySelector("body"),g=a.createElement("div"),h=a.createElement("div"),i=a.createElement("p"),j=a.createElement("a"),k=a.createElement("a");j.classList.add("share-button","twitter"),j.setAttribute("href","https://twitter.com/intent/tweet?text="+encodeURIComponent("The #TPP isn’t about trade: it’s about taking away our rights to life and liberty—it’s a trap! Watch:")+"&url="+e),j.setAttribute("target","_blank"),j.textContent="Tweet",k.classList.add("share-button","facebook"),k.setAttribute("href","https://facebook.com/sharer.php?u="+e),k.setAttribute("target","_blank"),k.textContent="Share",i.appendChild(k),i.appendChild(j),g.setAttribute("id","yt-video"),h.appendChild(g),h.classList.add("hidden","video"),window.location.href.indexOf("video=true")>-1&&(window.onload=d),(a.getElementById("video-play-button")||a.createElement("button")).addEventListener("click",d)}(document,window),function(a,b){"use strict";var c,d=(a.getElementById("petition-form"),a.getElementsByClassName("concealed")),e=a.getElementById("see-full-list")||a.createElement("button"),f=a.getElementById("endorsements"),g=a.getElementById("toggle-list")||a.createElement("button"),h=a.getElementById("fixed-side-social-container"),i=a.querySelector("nav"),j=a.getElementById("menu-expand");b.addEventListener("scroll",function(){b.scrollY>a.querySelector("header > p").offsetTop?h.classList.add("fade-in"):h.classList.remove("fade-in")}),b.addEventListener("resize",function(){b.innerWidth>=640&&i.classList.remove("menu-open")}),j.addEventListener("click",function(){i.classList.toggle("menu-open")}),a.getElementById("nav-items").addEventListener("click",function(){i.classList.remove("menu-open")}),e.addEventListener("click",function(a){for(a.preventDefault(),c=d.length;c--;)d[c].classList.remove("concealed");e.remove()}),g.addEventListener("click",function(a){a.preventDefault(),f.classList.toggle("hidden"),g.remove()});var k={parseQueryString:function(){var a,b,c={},d=window.location.search;for("?"===d[0]&&(d=d.substr(1)),b=d.split("&"),a=b.length;a--;)c[b[a].split("=")[0]]=b[a].split("=")[1];return c}},l=k.parseQueryString();if(l.ref){var m=a.getElementById("action-network-form")["signature[tag_list]"].value;m&&(m=JSON.parse(m),m.push("from-"+l.ref),a.getElementById("action-network-form")["signature[tag_list]"].value=JSON.stringify(m))}var n=document.querySelectorAll('a[href="#twitter"]');for(c=0;c