mirror of
https://github.com/huhu/rust-search-extension
synced 2024-11-14 15:47:12 +00:00
update host_permissions (#211)
This commit is contained in:
parent
b578fd882a
commit
59edcbb2ce
2 changed files with 5 additions and 2 deletions
2
core
2
core
|
@ -1 +1 @@
|
|||
Subproject commit 1c3102b7293bb70e9f9f9376e0b496bfc140e06c
|
||||
Subproject commit 880688c2b48c361489dacd3b4538daf1ee23cc72
|
|
@ -14,6 +14,7 @@ local description = 'Rust Search Extension - the ultimate search extension for R
|
|||
|
||||
local browser = std.extVar('browser');
|
||||
|
||||
local host_permissions = ['*://crates.io/api/v1/crates/*'];
|
||||
local json = if std.member(['chrome', 'edge'], browser) then
|
||||
local manifest_v3 = import 'core/manifest_v3.libsonnet';
|
||||
manifest_v3.new(name, keyword, description, version, service_worker='service-worker.js')
|
||||
|
@ -31,6 +32,7 @@ local json = if std.member(['chrome', 'edge'], browser) then
|
|||
// The production extension public key to get the constant extension id during development.
|
||||
[if browser == 'chrome' then 'key' else null]: 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxOX+QfzcFnxPwwmzXDhuU59XGCSMZq+FGo0vOx/ufg/Vw7HfKEPVb9TKzrGtqW38kafWkjxOxGhF7VyyX2ymi55W0xqf8BedePbvMtV6H1tY5bscJ0dLKGH/ZG4T4f645LgvOWOBgyv8s3NDWXzwOMS57ER1y+EtHjDsWD1M0nfe0VCCLW18QlAsNTHfLZk6lUeEeGXZrl6+jK+pZxwhQFmc8cJvOyw7uAq6IJ9lnGDvxFVjGUepA0lKbLuIZjN3p70mgVUIuBYzKE6R8HDk4oBbKAK0HyyKfnuAYbfwVYotHw4def+OW9uADSlZEDC10wwIpU9NoP3szh+vWSnk0QIDAQAB',
|
||||
}
|
||||
.addHostPermissions(host_permissions)
|
||||
else
|
||||
local manifest_v2 = import 'core/manifest.libsonnet';
|
||||
manifest_v2.new(name, keyword, description, version)
|
||||
|
@ -42,11 +44,12 @@ else
|
|||
.addBackgroundScripts(utils.js_files('index', ['attributes', 'books', 'caniuse', 'crates', 'std-docs', 'lints', 'labels', 'rfcs', 'commands', 'rustc', 'targets']))
|
||||
.addBackgroundScripts(utils.js_files('command', ['blog', 'label', 'help', 'stable', 'rfc', 'rustc', 'target']))
|
||||
.addBackgroundScripts(['statistics.js', 'rust-version.js', 'crate-manager.js', 'index-manager.js', 'main.js'])
|
||||
.addPermissions(host_permissions)
|
||||
;
|
||||
|
||||
local INDEX_MANAGER_FILES = ['core/storage.js', 'index-manager.js'];
|
||||
json.addIcons(icons())
|
||||
.addPermissions(['storage', 'unlimitedStorage', '*://crates.io/api/v1/crates/*'])
|
||||
.addPermissions(['storage', 'unlimitedStorage'])
|
||||
.setOptionsUi('manage/index.html')
|
||||
.addContentScript(
|
||||
matches=['*://docs.rs/*'],
|
||||
|
|
Loading…
Reference in a new issue