Permalink
Browse files

Initial commit

  • Loading branch information...
0 parents commit ed211f2cda128e7e2c8bb7be581c7c1ab65736a9 @atdt committed May 23, 2012
Showing with 125 additions and 0 deletions.
  1. +3 −0 .gitignore
  2. +29 −0 LICENSE
  3. +17 −0 Makefile
  4. +34 −0 README.mkd
  5. +20 −0 dnt/dnt.js
  6. BIN dnt/home-128.png
  7. BIN dnt/home-32.png
  8. BIN dnt/home-48.png
  9. BIN dnt/home-64.png
  10. +22 −0 dnt/manifest.json
@@ -0,0 +1,3 @@
+*.crx
+*.pem
+*.zip
29 LICENSE
@@ -0,0 +1,29 @@
+Copyright (c) 2012, Ori Livneh
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+ * The names of the contributors may not be used to endorse or
+ promote products derived from this software without specific
+ prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,17 @@
+EXTNAME := force-media-type
+KEYFILE := $(EXTNAME).pem
+EXTDIR := $(EXTNAME)
+SHELL := /usr/bin/env bash
+CHROME := open /Applications/Google\ Chrome.app -n --args
+CWD := $(shell pwd)
+SIZE := $(shell wc -c <$(CRXFILE) | tr -d ' ')
+VERSION := $(shell python -c "import json,sys;print json.loads(sys.stdin.read()).get('version','')" < $(EXTDIR)/manifest.json)
+
+all: pack
+
+pack:
+ $(CHROME) --pack-extension=$(CWD)/extension \
+ --pack-extension-key=$(CWD)/extension.pem --no-message-box
+
+zipball:
+ zip $(EXTNAME)-$(VERSION).zip $(EXTDIR)/*
@@ -0,0 +1,34 @@
+dnt
+===
+This Chrome / Chromium extension appends a [Do Not Track][0] header to all
+outgoing requests indicating that the user wishes to opt out of all tracking.
+
+License
+=======
+Copyright (c) 2012 Ori Livneh
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+Credits
+=======
+[Smashy The Alien][1] icon by [Maja Benčić][1]. Used with permission.
+
+ [0]: http://donottrack.us/
+ [1]: http://www.smashingmagazine.com/2008/07/23/smashy-the-alien-icon-set/
+ [2]: http://www.fritula.hr/index.php/home/
@@ -0,0 +1,20 @@
+/*jslint white:true */
+/*global chrome */
+
+(function ( http ) {
+
+ 'use strict';
+
+ var dnt_header = { name: 'DNT', value: '1' },
+ filter = { urls: [ '<all_urls>' ] },
+ info = [ 'requestHeaders', 'blocking' ];
+
+ function doNotTrack( r ) {
+ console.log( r );
+ r.requestHeaders.push( dnt_header );
+ return { requestHeaders: r.requestHeaders };
+ }
+
+ http.onBeforeSendHeaders.addListener( doNotTrack, filter, info );
+
+}( chrome.webRequest ));
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,22 @@
+{
+ "name": "dnt",
+ "description": "Adds the Do Not Track header to outgoing requests",
+ "icons": {
+ "32": "home-32.png",
+ "48": "home-48.png",
+ "64": "home-64.png",
+ "128": "home-128.png"
+ },
+ "homepage_url": "https://github.com/atdt/dnt",
+ "manifest_version": 2,
+ "version": "0.1",
+ "background": {
+ "scripts": ["dnt.js"]
+ },
+ "permissions": [
+ "webRequest",
+ "webRequestBlocking",
+ "<all_urls>"
+ ],
+ "minimum_chrome_version": "18"
+}

0 comments on commit ed211f2

Please sign in to comment.