unloosen 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +3 -3
- data/Gemfile.lock +4 -4
- data/README.md +12 -20
- data/Rakefile +8 -1
- data/app.rb +57 -57
- data/bin/dl-util.rb +22 -22
- data/bin/minify.rb +7 -7
- data/examples/kitchensink/app.rb +17 -17
- data/examples/omikuji-popup/app.rb +20 -20
- data/examples/omikuji-popup/popup.html +12 -12
- data/examples/simple-content-script/app.rb +5 -5
- data/examples/simple-content-script/loader-content-script.esm.js +22 -22
- data/examples/simple-content-script/manifest.json +22 -22
- data/examples/simple-content-script/module-content-script.esm.js +73 -73
- data/lib/unloosen/compat/rubygems.rb +91 -91
- data/lib/unloosen/emit/emit_bg.rb +2 -2
- data/lib/unloosen/emit/emit_cs.rb +2 -2
- data/lib/unloosen/emit/emit_pu.rb +2 -2
- data/lib/unloosen/emit/emit_sb.rb +2 -2
- data/lib/unloosen/mode/background.rb +8 -8
- data/lib/unloosen/mode/content_script.rb +17 -17
- data/lib/unloosen/mode/mode.rb +12 -12
- data/lib/unloosen/mode/on_installed.rb +9 -9
- data/lib/unloosen/mode/popup.rb +8 -8
- data/lib/unloosen/mode/sandbox.rb +8 -8
- data/lib/unloosen/toplevel_alias.rb +49 -49
- data/lib/unloosen/utils/js.rb +208 -208
- data/lib/unloosen/utils/require_remote.rb +125 -125
- data/lib/unloosen/version.rb +1 -1
- data/lib/unloosen_simple.rb +8 -8
- data/packages/unloosen-ruby/dist/entry/loader-content-script.esm.js +23 -23
- data/packages/unloosen-ruby/dist/entry/module-background.esm.js +85 -85
- data/packages/unloosen-ruby/dist/entry/module-content-script.esm.js +74 -74
- data/packages/unloosen-ruby/dist/entry/module-popup.esm.js +74 -74
- data/packages/unloosen-ruby/dist/entry/module-sandbox.esm.js +59 -59
- data/packages/unloosen-ruby/dist/index.esm.js +1 -1
- data/packages/unloosen-ruby/dist/unloosen.esm.js +60 -60
- data/packages/unloosen-ruby/package-lock.json +12 -11
- data/packages/unloosen-ruby/package.json +3 -5
- data/packages/unloosen-ruby/src/entry/loader-content-script.js +24 -24
- data/packages/unloosen-ruby/src/entry/module-background.js +26 -26
- data/packages/unloosen-ruby/src/entry/module-content-script.js +15 -15
- data/packages/unloosen-ruby/src/entry/module-popup.js +14 -14
- data/packages/unloosen-ruby/src/entry/module-sandbox.js +14 -14
- data/packages/unloosen-ruby/src/unloosen.js +62 -62
- data/unloosen.config.json +8 -8
- data/unloosen.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 825e63b3a67a11249de018f01c5608abaeca9309d067af85847954f2759d08d9
|
4
|
+
data.tar.gz: 2020bbf1befcd022c8d5f6716c933774ddf6804bd25fc32cd7d0976b11f66081
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36b9480351c75db86e5f614d94734c14186ec6e2a5354f529041515d0a14321536da488db05cdbfd8bb1b03eecf02f8fb28e5f63ee8b709ae6d067c4971c2abf
|
7
|
+
data.tar.gz: e158068c11d7ac65fafb9a2fab8733b8f78df635de51ad2cb713aa0c77cfd1a3256e69f91e71a2df1f5dd91b057c1f660b0d64ffd31488ad69c9c7bf859b117a
|
data/Gemfile
CHANGED
@@ -5,8 +5,8 @@ source "https://rubygems.org"
|
|
5
5
|
# Specify your gem's dependencies in unloosen.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
|
-
ruby '
|
8
|
+
ruby '3.2.0'
|
9
9
|
|
10
|
-
gem "rake", "~> 13.0"
|
10
|
+
gem "rake", "~> 13.0", groups: [:development]
|
11
11
|
|
12
|
-
gem "rspec", "~> 3.0"
|
12
|
+
gem "rspec", "~> 3.0", groups: [:development]
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
unloosen (0.1.
|
4
|
+
unloosen (0.1.2)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -12,12 +12,12 @@ GEM
|
|
12
12
|
rspec-core (~> 3.12.0)
|
13
13
|
rspec-expectations (~> 3.12.0)
|
14
14
|
rspec-mocks (~> 3.12.0)
|
15
|
-
rspec-core (3.12.
|
15
|
+
rspec-core (3.12.2)
|
16
16
|
rspec-support (~> 3.12.0)
|
17
|
-
rspec-expectations (3.12.
|
17
|
+
rspec-expectations (3.12.3)
|
18
18
|
diff-lcs (>= 1.2.0, < 2.0)
|
19
19
|
rspec-support (~> 3.12.0)
|
20
|
-
rspec-mocks (3.12.
|
20
|
+
rspec-mocks (3.12.5)
|
21
21
|
diff-lcs (>= 1.2.0, < 2.0)
|
22
22
|
rspec-support (~> 3.12.0)
|
23
23
|
rspec-support (3.12.0)
|
data/README.md
CHANGED
@@ -59,23 +59,25 @@ access http://www.example.com/
|
|
59
59
|
|
60
60
|
when everything goes fine, the header will be "Unloosen Example Page!".
|
61
61
|
|
62
|
-
#
|
62
|
+
# examples
|
63
63
|
|
64
|
-
|
64
|
+
[example extensions](https://github.com/aaaa777/unloosen/tree/main/examples)
|
65
65
|
|
66
|
+
<!--download this template repository!-->
|
66
67
|
|
67
|
-
# how unloosen works
|
68
68
|
|
69
|
+
# how unloosen works
|
69
70
|
|
71
|
+

|
70
72
|
|
71
73
|
# supported function
|
72
74
|
|name|method alias|loadfile|
|
73
75
|
|:-|:-|:-|
|
74
|
-
|[Popup](
|
75
|
-
|[Content Script](https://developer.chrome.com/docs/extensions/mv3/content_scripts/#static-declarative)|content_script
|
76
|
-
|[Background](https://developer.chrome.com/docs/extensions/mv3/service_workers/basics/#import-scripts)|background
|
77
|
-
|[SandBox(WIP)](https://developer.chrome.com/docs/extensions/mv3/manifest/sandbox/)|sandbox
|
78
|
-
|[OnInstalled event](https://developer.chrome.com/docs/extensions/reference/runtime/#event-onInstalled)|on_installed
|
76
|
+
|[Popup](https://developer.chrome.com/docs/extensions/reference/action/#manifest)|popup|`module-popup.esm.js`|
|
77
|
+
|[Content Script](https://developer.chrome.com/docs/extensions/mv3/content_scripts/#static-declarative)|content_script|`loader-content-script.esm.js` and `module-content-script.esm.js`(both required)|
|
78
|
+
|[Background](https://developer.chrome.com/docs/extensions/mv3/service_workers/basics/#import-scripts)|background|`module-background.esm.js`|
|
79
|
+
|[SandBox(WIP)](https://developer.chrome.com/docs/extensions/mv3/manifest/sandbox/)|sandbox|`module-sandbox.esm.js`|
|
80
|
+
|[OnInstalled event](https://developer.chrome.com/docs/extensions/reference/runtime/#event-onInstalled)|on_installed|`module-background.esm.js`|
|
79
81
|
|
80
82
|
|
81
83
|
|
@@ -87,19 +89,9 @@ TODO: Delete this and the text above, and describe your gem
|
|
87
89
|
|
88
90
|
## Installation
|
89
91
|
|
90
|
-
|
91
|
-
|
92
|
-
```ruby
|
93
|
-
gem 'unloosen'
|
94
|
-
```
|
95
|
-
|
96
|
-
And then execute:
|
97
|
-
|
98
|
-
$ bundle install
|
99
|
-
|
100
|
-
Or install it yourself as:
|
92
|
+
install with `npm i unloosen-ruby-loader`
|
101
93
|
|
102
|
-
|
94
|
+
after downloading, loader/module files in `node_modules/unloosen-ruby-loader/dist/entry/*.esm.js`
|
103
95
|
|
104
96
|
## Contributing
|
105
97
|
|
data/Rakefile
CHANGED
@@ -68,7 +68,7 @@ namespace :build do
|
|
68
68
|
end
|
69
69
|
|
70
70
|
namespace :copy do
|
71
|
-
desc "copy
|
71
|
+
desc "copy wasm into examples"
|
72
72
|
task :wasm, ['example'] do |task, args|
|
73
73
|
sh "cp ruby-packed.wasm packages/unloosen-ruby/dist/ruby.wasm"
|
74
74
|
if args.to_a.include?('example') then
|
@@ -76,8 +76,15 @@ namespace :copy do
|
|
76
76
|
sh "cp ruby-packed.wasm examples/simple-content-script/ruby.wasm"
|
77
77
|
end
|
78
78
|
end
|
79
|
+
|
80
|
+
desc "copy readme into npm package"
|
81
|
+
task :readme do
|
82
|
+
sh "cp -p README.md packages/unloosen-ruby/"
|
83
|
+
end
|
79
84
|
end
|
80
85
|
|
86
|
+
namespace :version do
|
87
|
+
end
|
81
88
|
|
82
89
|
|
83
90
|
namespace :setup do
|
data/app.rb
CHANGED
@@ -1,57 +1,57 @@
|
|
1
|
-
|
2
|
-
# p JS.global[:chrome][:runtime].call(:getURL, "manifest.json")
|
3
|
-
require "unloosen"
|
4
|
-
|
5
|
-
# add_require_remote_uri "https://raw.githubusercontent.com/rtomayko/tilt/master/lib/"
|
6
|
-
# add_require_remote_uri "https://raw.githubusercontent.com/haml/haml/master/lib/"
|
7
|
-
# add_require_remote_uri "https://raw.githubusercontent.com/judofyr/temple/master/lib"
|
8
|
-
# require "haml"
|
9
|
-
# require "tilt"
|
10
|
-
|
11
|
-
# simple unloosen version like sinatro
|
12
|
-
#require_relative "lib/unloosen_simple"
|
13
|
-
|
14
|
-
# when popup message
|
15
|
-
#popup do
|
16
|
-
# popup last value
|
17
|
-
"テストメッセージ"
|
18
|
-
#end
|
19
|
-
p "app loaded"
|
20
|
-
# when load site
|
21
|
-
p "current_event: #{Unloosen::CURRENT_EVENT}"
|
22
|
-
p "on_installed: #{Unloosen.const_defined?("ON_INSTALLED")}"
|
23
|
-
|
24
|
-
on_installed do
|
25
|
-
p chrome.contextMenus.create(
|
26
|
-
JS.try_convert_hash({
|
27
|
-
"id": "sampleContextMenu",
|
28
|
-
"title": "Sample Context Menu",
|
29
|
-
"contexts": ["selection"]
|
30
|
-
})
|
31
|
-
)
|
32
|
-
end
|
33
|
-
|
34
|
-
content_script sites: ["http://www.example.com/", /^*.google.com$/] do
|
35
|
-
p("hello, world!")
|
36
|
-
p alert("test")
|
37
|
-
end
|
38
|
-
|
39
|
-
background do
|
40
|
-
console.log("hello, world3!")
|
41
|
-
end
|
42
|
-
|
43
|
-
popup do
|
44
|
-
main_div = document.getElementsByClassName('omikuji')[0]
|
45
|
-
btn = document.createElement('button')
|
46
|
-
btn.innerText = 'draw omikuji'
|
47
|
-
res = document.createElement('h2')
|
48
|
-
|
49
|
-
btn.addEventListener('click') do |e|
|
50
|
-
res.innerText = ['lucky', 'unlucky'].sample
|
51
|
-
end
|
52
|
-
|
53
|
-
main_div.innerText = ''
|
54
|
-
main_div.appendChild(res)
|
55
|
-
main_div.appendChild(btn)
|
56
|
-
end
|
57
|
-
|
1
|
+
|
2
|
+
# p JS.global[:chrome][:runtime].call(:getURL, "manifest.json")
|
3
|
+
require "unloosen"
|
4
|
+
|
5
|
+
# add_require_remote_uri "https://raw.githubusercontent.com/rtomayko/tilt/master/lib/"
|
6
|
+
# add_require_remote_uri "https://raw.githubusercontent.com/haml/haml/master/lib/"
|
7
|
+
# add_require_remote_uri "https://raw.githubusercontent.com/judofyr/temple/master/lib"
|
8
|
+
# require "haml"
|
9
|
+
# require "tilt"
|
10
|
+
|
11
|
+
# simple unloosen version like sinatro
|
12
|
+
#require_relative "lib/unloosen_simple"
|
13
|
+
|
14
|
+
# when popup message
|
15
|
+
#popup do
|
16
|
+
# popup last value
|
17
|
+
"テストメッセージ"
|
18
|
+
#end
|
19
|
+
p "app loaded"
|
20
|
+
# when load site
|
21
|
+
p "current_event: #{Unloosen::CURRENT_EVENT}"
|
22
|
+
p "on_installed: #{Unloosen.const_defined?("ON_INSTALLED")}"
|
23
|
+
|
24
|
+
on_installed do
|
25
|
+
p chrome.contextMenus.create(
|
26
|
+
JS.try_convert_hash({
|
27
|
+
"id": "sampleContextMenu",
|
28
|
+
"title": "Sample Context Menu",
|
29
|
+
"contexts": ["selection"]
|
30
|
+
})
|
31
|
+
)
|
32
|
+
end
|
33
|
+
|
34
|
+
content_script sites: ["http://www.example.com/", /^*.google.com$/] do
|
35
|
+
p("hello, world!")
|
36
|
+
p alert("test")
|
37
|
+
end
|
38
|
+
|
39
|
+
background do
|
40
|
+
console.log("hello, world3!")
|
41
|
+
end
|
42
|
+
|
43
|
+
popup do
|
44
|
+
main_div = document.getElementsByClassName('omikuji')[0]
|
45
|
+
btn = document.createElement('button')
|
46
|
+
btn.innerText = 'draw omikuji'
|
47
|
+
res = document.createElement('h2')
|
48
|
+
|
49
|
+
btn.addEventListener('click') do |e|
|
50
|
+
res.innerText = ['lucky', 'unlucky'].sample
|
51
|
+
end
|
52
|
+
|
53
|
+
main_div.innerText = ''
|
54
|
+
main_div.appendChild(res)
|
55
|
+
main_div.appendChild(btn)
|
56
|
+
end
|
57
|
+
|
data/bin/dl-util.rb
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
require "js"
|
2
|
-
module Unloosen
|
3
|
-
|
4
|
-
# run ruby code without vfs build
|
5
|
-
module FS
|
6
|
-
|
7
|
-
# FS.readI("manifest.json")
|
8
|
-
def read(filepath)
|
9
|
-
fetch(JS.global.chrome.runtime.getURL(filepath))
|
10
|
-
end
|
11
|
-
|
12
|
-
private
|
13
|
-
|
14
|
-
# fetch
|
15
|
-
def fetch(url)
|
16
|
-
response = JS.global.fetch(url).await
|
17
|
-
response.text.await
|
18
|
-
end
|
19
|
-
|
20
|
-
|
21
|
-
end
|
22
|
-
|
1
|
+
require "js"
|
2
|
+
module Unloosen
|
3
|
+
|
4
|
+
# run ruby code without vfs build
|
5
|
+
module FS
|
6
|
+
|
7
|
+
# FS.readI("manifest.json")
|
8
|
+
def read(filepath)
|
9
|
+
fetch(JS.global.chrome.runtime.getURL(filepath))
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
# fetch
|
15
|
+
def fetch(url)
|
16
|
+
response = JS.global.fetch(url).await
|
17
|
+
response.text.await
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
23
|
end
|
data/bin/minify.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
filepath = ARGV.first
|
4
|
-
|
5
|
-
File.open(filepath, "r+") do |file|
|
6
|
-
code = file.read()
|
7
|
-
file.write(code.gsub("\n\w*", ";"))
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
filepath = ARGV.first
|
4
|
+
|
5
|
+
File.open(filepath, "r+") do |file|
|
6
|
+
code = file.read()
|
7
|
+
file.write(code.gsub("\n\w*", ";"))
|
8
8
|
end
|
data/examples/kitchensink/app.rb
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
require 'unloosen'
|
2
|
-
|
3
|
-
content_script do
|
4
|
-
p 'content_script loaded'
|
5
|
-
end
|
6
|
-
|
7
|
-
popup do
|
8
|
-
p 'popup loaded'
|
9
|
-
end
|
10
|
-
|
11
|
-
background do
|
12
|
-
p 'backgound loaded'
|
13
|
-
end
|
14
|
-
|
15
|
-
on_installed do
|
16
|
-
p 'this is on_install event'
|
17
|
-
end
|
1
|
+
require 'unloosen'
|
2
|
+
|
3
|
+
content_script do
|
4
|
+
p 'content_script loaded'
|
5
|
+
end
|
6
|
+
|
7
|
+
popup do
|
8
|
+
p 'popup loaded'
|
9
|
+
end
|
10
|
+
|
11
|
+
background do
|
12
|
+
p 'backgound loaded'
|
13
|
+
end
|
14
|
+
|
15
|
+
on_installed do
|
16
|
+
p 'this is on_install event'
|
17
|
+
end
|
@@ -1,20 +1,20 @@
|
|
1
|
-
require "unloosen"
|
2
|
-
|
3
|
-
popup do
|
4
|
-
# create button element
|
5
|
-
button = document.createElement('button')
|
6
|
-
button.innerText = 'draw omikuji'
|
7
|
-
|
8
|
-
# create h2 element
|
9
|
-
result = document.createElement('h2')
|
10
|
-
|
11
|
-
# add event listener 'click'
|
12
|
-
button.addEventListener 'click' do |e|
|
13
|
-
result.innerText = ['lucky', 'unlucky'].sample
|
14
|
-
end
|
15
|
-
|
16
|
-
# load main contents
|
17
|
-
main_div = document.getElementsByClassName('omikuji')[0]
|
18
|
-
main_div.innerText = ''
|
19
|
-
[result, button].each { |e| main_div.appendChild(e) }
|
20
|
-
end
|
1
|
+
require "unloosen"
|
2
|
+
|
3
|
+
popup do
|
4
|
+
# create button element
|
5
|
+
button = document.createElement('button')
|
6
|
+
button.innerText = 'draw omikuji'
|
7
|
+
|
8
|
+
# create h2 element
|
9
|
+
result = document.createElement('h2')
|
10
|
+
|
11
|
+
# add event listener 'click'
|
12
|
+
button.addEventListener 'click' do |e|
|
13
|
+
result.innerText = ['lucky', 'unlucky'].sample
|
14
|
+
end
|
15
|
+
|
16
|
+
# load main contents
|
17
|
+
main_div = document.getElementsByClassName('omikuji')[0]
|
18
|
+
main_div.innerText = ''
|
19
|
+
[result, button].each { |e| main_div.appendChild(e) }
|
20
|
+
end
|
@@ -1,13 +1,13 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<script src="module-popup.esm.js" type="module"></script>
|
4
|
-
</head>
|
5
|
-
<body>
|
6
|
-
<div class="container" style="width: 400px;">
|
7
|
-
<h1>Omikuji page</h1>
|
8
|
-
<div class="omikuji">
|
9
|
-
now loading...
|
10
|
-
</div>
|
11
|
-
</div>
|
12
|
-
</body>
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<script src="module-popup.esm.js" type="module"></script>
|
4
|
+
</head>
|
5
|
+
<body>
|
6
|
+
<div class="container" style="width: 400px;">
|
7
|
+
<h1>Omikuji page</h1>
|
8
|
+
<div class="omikuji">
|
9
|
+
now loading...
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
</body>
|
13
13
|
</html>
|
@@ -1,6 +1,6 @@
|
|
1
|
-
require "unloosen"
|
2
|
-
|
3
|
-
content_script site: "www.example.com" do
|
4
|
-
document.querySelector("h1").innerText = "Example Page with ruby.wasm!"
|
5
|
-
document.body.style.backgroundColor = "crimson"
|
1
|
+
require "unloosen"
|
2
|
+
|
3
|
+
content_script site: "www.example.com" do
|
4
|
+
document.querySelector("h1").innerText = "Example Page with ruby.wasm!"
|
5
|
+
document.body.style.backgroundColor = "crimson"
|
6
6
|
end
|
@@ -1,23 +1,23 @@
|
|
1
|
-
(async() => {
|
2
|
-
const loadConfig = async (configKey, defaultVal) => {
|
3
|
-
try {
|
4
|
-
return await fetch(chrome.runtime.getURL("unloosen.config.json"))
|
5
|
-
.then((response) => {
|
6
|
-
if(response.ok) {
|
7
|
-
return response.json().then((json) => json[configKey] == undefined ? defaultVal : json[configKey]);
|
8
|
-
} else {
|
9
|
-
return defaultVal;
|
10
|
-
}
|
11
|
-
});
|
12
|
-
} catch {
|
13
|
-
return defaultVal;
|
14
|
-
}
|
15
|
-
};
|
16
|
-
|
17
|
-
// load as module
|
18
|
-
// https://blog.holyblue.jp/entry/2022/07/10/182137
|
19
|
-
|
20
|
-
const path = await loadConfig("content-script-entry", 'module-content-script.esm.js');
|
21
|
-
const src = chrome.runtime.getURL(path);
|
22
|
-
await import(src);
|
1
|
+
(async() => {
|
2
|
+
const loadConfig = async (configKey, defaultVal) => {
|
3
|
+
try {
|
4
|
+
return await fetch(chrome.runtime.getURL("unloosen.config.json"))
|
5
|
+
.then((response) => {
|
6
|
+
if(response.ok) {
|
7
|
+
return response.json().then((json) => json[configKey] == undefined ? defaultVal : json[configKey]);
|
8
|
+
} else {
|
9
|
+
return defaultVal;
|
10
|
+
}
|
11
|
+
});
|
12
|
+
} catch {
|
13
|
+
return defaultVal;
|
14
|
+
}
|
15
|
+
};
|
16
|
+
|
17
|
+
// load as module
|
18
|
+
// https://blog.holyblue.jp/entry/2022/07/10/182137
|
19
|
+
|
20
|
+
const path = await loadConfig("content-script-entry", 'module-content-script.esm.js');
|
21
|
+
const src = chrome.runtime.getURL(path);
|
22
|
+
await import(src);
|
23
23
|
})();
|
@@ -1,23 +1,23 @@
|
|
1
|
-
{
|
2
|
-
"manifest_version": 3,
|
3
|
-
"name": "edit www.example.com",
|
4
|
-
"description": "this extension is built by unloosen with ruby!",
|
5
|
-
"version": "0.0.1",
|
6
|
-
"content_scripts": [
|
7
|
-
{
|
8
|
-
"js": [
|
9
|
-
"loader-content-script.esm.js"
|
10
|
-
],
|
11
|
-
"matches": ["http://www.example.com/"]
|
12
|
-
}
|
13
|
-
],
|
14
|
-
"content_security_policy": {
|
15
|
-
"extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self';"
|
16
|
-
},
|
17
|
-
"web_accessible_resources": [
|
18
|
-
{
|
19
|
-
"resources": ["*"],
|
20
|
-
"matches": ["<all_urls>"]
|
21
|
-
}
|
22
|
-
]
|
1
|
+
{
|
2
|
+
"manifest_version": 3,
|
3
|
+
"name": "edit www.example.com",
|
4
|
+
"description": "this extension is built by unloosen with ruby!",
|
5
|
+
"version": "0.0.1",
|
6
|
+
"content_scripts": [
|
7
|
+
{
|
8
|
+
"js": [
|
9
|
+
"loader-content-script.esm.js"
|
10
|
+
],
|
11
|
+
"matches": ["http://www.example.com/"]
|
12
|
+
}
|
13
|
+
],
|
14
|
+
"content_security_policy": {
|
15
|
+
"extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self';"
|
16
|
+
},
|
17
|
+
"web_accessible_resources": [
|
18
|
+
{
|
19
|
+
"resources": ["*"],
|
20
|
+
"matches": ["<all_urls>"]
|
21
|
+
}
|
22
|
+
]
|
23
23
|
}
|