Request permissions for all 4chan.org and 4cdn.org subdomains in the Chrome extension.
This should reduce the frequency of asking for new permissions.
This commit is contained in:
parent
14b7bb2f1f
commit
a110d2f703
10
package.json
10
package.json
@ -21,12 +21,18 @@
|
||||
"youtubeAPIKey": "AIzaSyB5_zaen_-46Uhz1xGR-lz1YoUMHqCD6CE",
|
||||
"distBranch": "gh-pages",
|
||||
"uploadPath": "www.4chan-x.net:/var/www/html/",
|
||||
"matches": [
|
||||
"includes_only": [
|
||||
"*://boards.4chan.org/*",
|
||||
"*://sys.4chan.org/*",
|
||||
"*://www.4chan.org/*",
|
||||
"*://i.4cdn.org/*",
|
||||
"*://is.4chan.org/*",
|
||||
"*://is.4chan.org/*"
|
||||
],
|
||||
"matches_only": [
|
||||
"*://*.4chan.org/*",
|
||||
"*://*.4cdn.org/*"
|
||||
],
|
||||
"matches": [
|
||||
"https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*",
|
||||
"https://www.google.com/recaptcha/api2/frame?*&k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*",
|
||||
"https://www.google.com/recaptcha/api2/frame?*&k=887877714&*",
|
||||
|
||||
@ -147,6 +147,8 @@ Main =
|
||||
ImageCommon.addControls video
|
||||
return
|
||||
|
||||
return unless hostname is 'boards.4chan.org'
|
||||
|
||||
if pathname[2] in ['thread', 'res']
|
||||
g.VIEW = 'thread'
|
||||
g.THREADID = +pathname[3]
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
},
|
||||
"content_scripts": [{
|
||||
"js": ["script.js"],
|
||||
"matches": <%= JSON.stringify(meta.matches) %>,
|
||||
"matches": <%= JSON.stringify(meta.matches_only.concat(meta.matches)) %>,
|
||||
"exclude_matches": <%= JSON.stringify(meta.exclude_matches) %>,
|
||||
"all_frames": true,
|
||||
"run_at": "document_start"
|
||||
@ -24,8 +24,7 @@
|
||||
"key": "<%= meta.appid %>",
|
||||
<% } %> "minimum_chrome_version": "<%= meta.min.chrome %>",
|
||||
"permissions": [
|
||||
"storage",
|
||||
"*://a.4cdn.org/"
|
||||
"storage"
|
||||
],
|
||||
"optional_permissions": [
|
||||
"*://*/"
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
return expand(matches, /^\*/, ['http', 'https']);
|
||||
}
|
||||
return [].concat(
|
||||
expandMatches(meta.matches).map(function(match) {
|
||||
expandMatches(meta.includes_only.concat(meta.matches)).map(function(match) {
|
||||
return '// @include ' + match;
|
||||
}),
|
||||
expandMatches(meta.exclude_matches).map(function(match) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user