Skip to content

Commit

Permalink
使用微软 CDN 镜像 jquery.com (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
Endle authored Jan 20, 2021
1 parent d2b823d commit 99398c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion firfox/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ chrome.webRequest.onBeforeRequest.addListener(
url = url.replace('themes.googleusercontent.com', 'google-themes.lug.ustc.edu.cn');
url = url.replace('www.google.com/recaptcha/','www.recaptcha.net/recaptcha/');
url = url.replace('maxcdn.bootstrapcdn.com/bootstrap/','cdn.bootcdn.net/ajax/libs/twitter-bootstrap/');
url = url.replace('code.jquery.com/jquery-', 'ajax.aspnetcdn.com/ajax/jQuery/jquery-');

return {redirectUrl: url};
},
{
urls: [
"*://ajax.googleapis.com/*",
"*://themes.googleusercontent.com/*",
"*://maxcdn.bootstrapcdn.com/bootstrap/*"
"*://maxcdn.bootstrapcdn.com/bootstrap/*",
"*://code.jquery.com/*"
]
},
["blocking"]
Expand Down

0 comments on commit 99398c4

Please sign in to comment.