www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 68c4a47bf3cf13228ae0a71b1e8f626d8a446a46
parent afd758f509d48f310503cc842d161fcfac93b164
Author: Simon Kornblith <simon@simonster.com>
Date:   Fri, 25 Jun 2010 21:29:22 +0000

- don't automatically associate .edu sites (except Project MUSE)
- if a docShell has allowMetaRedirects turned off (as is the case in our hidden browsers), don't proxy


Diffstat:
Mchrome/content/zotero/xpcom/proxy.js | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/proxy.js b/chrome/content/zotero/xpcom/proxy.js @@ -112,9 +112,10 @@ Zotero.Proxies = new function() { var webNav = null; try { webNav = channel.notificationCallbacks.QueryInterface(Components.interfaces.nsIWebNavigation); + docShell = channel.notificationCallbacks.QueryInterface(Components.interfaces.nsIDocShell); } catch(e) {} - if(webNav) { + if(webNav && docShell && docShell.allowMetaRedirects) { var proxied = Zotero.Proxies.properToProxy(url, true); if(proxied) { channel.QueryInterface(Components.interfaces.nsIHttpChannel); @@ -273,6 +274,7 @@ Zotero.Proxies = new function() { * @const */ const hostBlacklist = [ + /edu$/, /google\.com$/, /wikipedia\.org$/, /^[^.]*$/ @@ -283,7 +285,8 @@ Zotero.Proxies = new function() { * @const */ const hostWhitelist = [ - /^scholar\.google\.com$/ + /^scholar\.google\.com$/, + /^muse\.jhu\.edu$/ ] for each(var blackPattern in hostBlacklist) {