Help fight surveillance by adding just 9 lines of code to your website.
CSS JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
screenshots
thedaywefightback
COPYING
README.md
widget.js
widget.min.js

README.md

Project Megaphone

Saturday October 26th is the 12th anniversary of the PATRIOT Act.

To mark the law's anniversary, the EFF, ACLU, Demand Progress, Free Press and dozens of other public advocacy groups in the StopWatching.us coalition are planning a rally to protest mass surveilance in Washington, DC. We've spent countless hours organizing buses to transport people from nearby cities, assembled a great lineup of speakers, and filed the relevant permits.

If you own a website, no matter how big or small, we need your help.

Mass surveillance is a grave challenge to privacy on the Internet, and threatens our ability to communicate and conduct transactions privately online. This is a critical moment: If we don't convince Congress to make meaningful change now, while Snowden's leaks have the public's attention, we may never have another chance.

How Project Megaphone works

Project Megaphone is a simple script that you can add to your site. The script checks the IP of each visitor, and if they are within a 700km radius of Washington, D.C., displays a banner informing the user of the rally.

A few important notes:

  • The banners are not displayed on mobile devices.
  • The script automatically stops displaying the banner after 12pm on October 26th.
  • The script and geolocation server have been thoroughly load-tested and can handle millions of hits per day.

Banner styles

The "view example page" links below display the banners even if you're not near D.C.

Default style - view example page
modal

Modal - view example page
modal

Strip - view example page
modal

WordPress Plugin

Installing the script is now super easy with our WordPress plugin. Search for 'Project Megaphone Banner' in your WordPress plugins area, download it and activate it, that's it!

http://wordpress.org/plugins/project-megaphone-banner/

Getting started

Simply copy and paste the code below into your website.

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

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

Script defaults

  • The script will run between the date that you add it to your site and 12pm on October 26th.
  • We only display the widget for people in 700km radius of Washington DC, based off their IP address.
  • If a user clicks to close the banner, the banner will not be shown to them for another 48 hours.
  • We only display banners to desktop computers; mobile devices won't see it.

Configuration

You can choose a different banner style and customize the preferences using a javascript object:

<!--[if !(lte IE 8)]><!-->
<script> 
  var tfrce_config = {
    show_style: 'default', // The three available styles are 'default', 'modal', and 'strip' .

    disableGeo: false, // If true, will show to all visitors not just those around Washington DC
    cookieTimeout: 172800 // This is the amount of time before the banner will be shown to a user again. Default value is 172800 (two days)
  };
  (function(){
    var e = document.createElement('script'); e.type='text/javascript'; e.async = true;
    e.src = document.location.protocol + '//d1ux67szpr7bp0.cloudfront.net/project-megaphone/widget.min.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(e, s);
  })();
</script>
<!--<![endif]-->

Please feel free to fork and submit pull requests for any bugs or quirks you might find. Project Megaphone'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 Braunson Yager, Thomas Davis, Tyler Morgan, Beau Gunderson and Sina Khanifar.

List of participating sites: