Giter Club home page Giter Club logo

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.

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

thedaywefightback.js's People

Contributors

sinak avatar thomasdavis avatar sohailkh avatar beaugunderson avatar tmadeira avatar sammularczyk avatar s-zeid avatar chimeracoder avatar abruzzi avatar mrjameshamilton avatar

Watchers

 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.