Created
March 27, 2013 16:29
-
-
Save YellowSharkMT/5255698 to your computer and use it in GitHub Desktop.
PAC Script to block NYT paywall. See http://www.proxypacfiles.com/proxypac/ for more info on Automatic Proxy Configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Proxy PAC Script to block the NYT paywall | |
========================================== | |
Save this file to your local machine (example: my_proxy_config.pac), and then search "[your browser] | |
automatic proxy configuration" to find out how to implement it with your browser. For Firefox, go to | |
Tools -> Options -> Advanced -> Network tab -> Connection box -> Settings, and select Automatic Proxy | |
Configuration URL, and use a format like this for the file: | |
file:///c:/users/me/Dropbox/bin/my_proxy_config.pac | |
See http://www.proxypacfiles.com/proxypac/ for more info on Automatic Proxy Configuration | |
*/ | |
function FindProxyForURL(url, host) { | |
nyt_mtr = "http://js.nyt.com/js/mtr.js"; | |
if (nyt_mtr == url) { | |
return "PROXY 127.0.0.1:8000"; | |
} | |
nyt_mtr_service = /^http:\/\/meter-svc\.nytimes\.com\/meter\.js(.*)?$/g | |
if(nyt_mtr_service.test(url)){ | |
return "PROXY 127.0.0.1:8000"; | |
} | |
return "DIRECT"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment