Giter Site home page Giter Site logo

martindale / thedaywefightback.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tfrce/thedaywefightback.js

0.0 3.0 0.0 3.16 MB

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

Home Page: https://thedaywefightback.org

License: GNU Affero General Public License v3.0

thedaywefightback.js's Introduction

thedaywefightback.js

Please feel free to make pull requests with any fixes, and leave suggestions and bugs on our issue page. We've tried our best to accomodate all browsers but will fix any remaining issues before the 11th.

thedaywefightback.js is a javascript snippet that automatically activates at midnight of February 11th and adds a banner to your site for 24 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.

banner

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

Demo pages

View the US demo page or the international demo page - (unless explicitly set the banner uses GeoIP to detect your location).

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.

Simply copy and paste the code below into your website, right above the closing <body> tag.

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

<!--[if !(lte IE 8)]><!-->
<script type="text/javascript"> 
  // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt GPL-v3-or-Later
  (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);
  })();
  // @license-end
</script>
<!--<![endif]-->

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

The counts will reset on the day, and only the additions on the 11th will contribute to the total.

Customize the banner

You can customize the preferences using a javascript object:

<script type="text/javascript"> 
  // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt GPL-v3-or-Later
  // The defaults are set below
  var tdwfb_config = {
    greeting: 'Dear Internet Users', // Sets the salutation at the top left
    disableDate: false, // If true, the banner shows even if the date is not yet 02/11/2014
    callOnly: false // If true, the banner only displays a form for calling congress
  };
  (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);
  })();
  // @license-end
</script>

Other ways to install the banner

A Cloudflare app and Wordpress plugin will be added soon.

Let us know you're taking part

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

Copyright and thanks

Please feel free to fork and submit pull requests for any bugs or quirks you might find. thedaywefightback.js's code is licensed under the terms of the GNU Affero General Public License version 3, or, at your option, any later version (See ./COPYING

Built by Taskforce.is members Thomas Davis and Sina Khanifar.

A big thank you to Twilio for sponsoring calls and Rob Spectre for all his help.

Screenshots

Main Banner

banner

Call Tool Pop-up

call tool

Email Tool Pop-up

email tool

thedaywefightback.js's People

Contributors

beaugunderson avatar sinak avatar sohailkh avatar thomasdavis avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.