Skip to content

Commit 83b4fe4

Browse files
author
robot
committed
feat: v3
1 parent 98ba6ee commit 83b4fe4

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

‎leetcode-cheat.zip

-150 Bytes
Binary file not shown.

‎public/manifest.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@
2727
{
2828
"resources": [
2929
"/static/js/content.js"
30+
],
31+
"matches": [
32+
"*://leetcode-cn.com/*",
33+
"*://leetcode.com/*",
34+
"*://leetcode.cn/*"
3035
]
3136
}
3237
],
3338
"permissions": [
3439
"tabs"
35-
],
36-
"content_security_policy": {
37-
"extension_pages": "script-src 'self' 'sha256-9HcBuUP35aPkU0991A4mASdsuifTkUlifJ7elThz6Ow=' 'sha256-0Jo/EYaXS11i7poc/P9fGcq/o6P0djny2JW6WivTVVw='; object-src 'self'",
38-
"sandbox": "script-src 'self' 'sha256-9HcBuUP35aPkU0991A4mASdsuifTkUlifJ7elThz6Ow=' 'sha256-0Jo/EYaXS11i7poc/P9fGcq/o6P0djny2JW6WivTVVw='; object-src 'self'"
39-
}
40+
]
4041
}

‎src/inject.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ function injectScript(file_path, tag) {
1212
script.setAttribute("src", file_path);
1313
node.appendChild(script);
1414
}
15-
window.chrome.extension &&
16-
injectScript(window.chrome.extension.getURL("/static/js/content.js"), "body");
15+
window.chrome.runtime &&
16+
injectScript(window.chrome.runtime.getURL("/static/js/content.js"), "body");

0 commit comments

Comments
 (0)