Skip to content

Add a banner to your site in opposition to mass surveillance on 02/11

License

GPL-3.0, Unknown licenses found

Licenses found

GPL-3.0
COPYING
Unknown
license-header.txt
Notifications You must be signed in to change notification settings

tfrce/thedaywefightback.js

Repository files navigation

thedaywefightback.js

Please feel free to make pull requests with any fixes, and leave suggestions and bugs on our issue page.

thedaywefightback.js is a javascript snippet that automatically activates at midnight of February 11th and adds a banner to your site for 26 hours in support of thedaywefightback.org.

The goal is to drive as many phone calls and emails on the 11th. The calls are connected automatically by our call server for free thanks to Twilio.

If you own a website, no matter how big or small, you can be part of this.

banner

Demo pages

Note: Please don't copy the code from the source files of the demo pages. Use the code below instead.

Getting started

You can add the snippet to your site now - it won't be activated until midnight EST on February 11th and will remain active for 26 hours.

Place the code below before </body> tag. The script loads asynchronously and won't affect page load times.

<!--[if !(lt IE 8)]><!-->
<script type="text/javascript">
  (function(){
    var e = document.createElement('script'); e.type='text/javascript'; e.async = true;
    e.src = document.location.protocol + '//d1agz031tafz8n.cloudfront.net/thedaywefightback.js/widget.min.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(e, s);
  })();
</script>
<!--<![endif]-->

The widget supports all screen sizes and platforms, if you encounter a bug please let us know on the issues page.

Other ways to install the banner:

Configuration

You can configure the banner using a javascript object:

<!--[if !(lt IE 8)]><!-->
<script type="text/javascript"> 
  // The defaults are set below
  var tdwfb_config = {
    greeting: 'Dear Internet', // Sets the salutation shown in the banner.
    disableDate: false, // If true, the banner shows even if the date is not yet 02/11/2014. Use for testing.
    callOnly: true // If true, the banner emphasizes calling congress over emailing.
  };
  (function(){
    var e = document.createElement('script'); e.type='text/javascript'; e.async = true;
    e.src = document.location.protocol + '//d1agz031tafz8n.cloudfront.net/thedaywefightback.js/widget.min.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(e, s);
  })();
</script>
<!--<![endif]-->

###Custom CSS

The body tag has a class of "tdwfb-banner". You can use this to style elements if needed.

For example, to change the background from black to something lighter:

.tdwfb-banner {
	background: #111;
}

Let us know you're taking part

If you add the banner to your site, sign up at TheDayWeFightBack.org and let us know.

Thanks

Built by Taskforce.is members Thomas Davis, Sina Khanifar, Sam Mularczyk and Beau Gunderson.

Design by Max Temkin.

A big thank you to Twilio for sponsoring calls.

Screenshots

Main Banner

banner

Call Tool Pop-up

call tool

Email Tool Pop-up

email tool

About

Add a banner to your site in opposition to mass surveillance on 02/11

Resources

License

GPL-3.0, Unknown licenses found

Licenses found

GPL-3.0
COPYING
Unknown
license-header.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published