Skip to content

Commit

Permalink
替换 gstatic 资源
Browse files Browse the repository at this point in the history
Signed-off-by: 迷渡 <[email protected]>
  • Loading branch information
justjavac committed Jul 14, 2020
1 parent 9a43d8a commit 40813cc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chrome/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ chrome.webRequest.onBeforeRequest.addListener(
var url = request.url.replace('http://', 'https://')
url = url.replace('googleapis.com', 'proxy.ustclug.org');
url = url.replace('themes.googleusercontent.com', 'google-themes.lug.ustc.edu.cn');
url = url.replace('fonts.gstatic.com', 'fonts-gstatic.lug.ustc.edu.cn');
url = url.replace('www.google.com/recaptcha/','www.recaptcha.net/recaptcha/');
return {redirectUrl: url};
},
{
urls: [
"*://ajax.googleapis.com/*",
"*://themes.googleusercontent.com/*",
"*://fonts.gstatic.com/*",
"*://www.google.com/recaptcha/*"
]
},
Expand Down

1 comment on commit 40813cc

@justjavac
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixes #8

Please sign in to comment.