mirror of
https://github.com/DIYgod/RSSHub-Radar.git
synced 2026-09-18 08:39:37 +08:00
feat: offscreen page
This commit is contained in:
+7
-2
@@ -19,7 +19,7 @@
|
||||
"devDependencies": {
|
||||
"@ianvs/prettier-plugin-sort-imports": "4.1.1",
|
||||
"@iconify/tailwind": "^0.1.4",
|
||||
"@types/chrome": "0.0.251",
|
||||
"@types/chrome": "^0.0.254",
|
||||
"@types/node": "20.9.0",
|
||||
"@types/react": "18.2.37",
|
||||
"@types/react-dom": "18.2.15",
|
||||
@@ -35,7 +35,12 @@
|
||||
"https://*/*"
|
||||
],
|
||||
"permissions": [
|
||||
"tabs"
|
||||
"tabs",
|
||||
"offscreen",
|
||||
"storage",
|
||||
"notifications",
|
||||
"alarms",
|
||||
"idle"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+4
-4
@@ -29,8 +29,8 @@ devDependencies:
|
||||
specifier: ^0.1.4
|
||||
version: 0.1.4
|
||||
'@types/chrome':
|
||||
specifier: 0.0.251
|
||||
version: 0.0.251
|
||||
specifier: ^0.0.254
|
||||
version: 0.0.254
|
||||
'@types/node':
|
||||
specifier: 20.9.0
|
||||
version: 20.9.0
|
||||
@@ -2638,8 +2638,8 @@ packages:
|
||||
engines: {node: '>=10.13.0'}
|
||||
dev: false
|
||||
|
||||
/@types/chrome@0.0.251:
|
||||
resolution: {integrity: sha512-UF+yr0LEKWWGsKxQ5A3XOSF5SNoU1ctW3pXcWJPpT8OOUTEspYeaLU8spDKe+6xalXeMTS0TBrX1g0b6qlWmkw==}
|
||||
/@types/chrome@0.0.254:
|
||||
resolution: {integrity: sha512-svkOGKwA+6ZZuk9xtrYun8MYpNY/9hD17rgZ19v3KunhsK1ZOKaMESw12/1AXLh1u3UPA8jQIRi2370DXv9wgw==}
|
||||
dependencies:
|
||||
'@types/filesystem': 0.0.35
|
||||
'@types/har-format': 1.2.15
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
export {}
|
||||
console.log("HELLO WORLD FROM BGSCRIPTS")
|
||||
@@ -0,0 +1,8 @@
|
||||
export { }
|
||||
console.log("HELLO WORLD FROM BGSCRIPTS")
|
||||
|
||||
chrome.offscreen.createDocument({
|
||||
url: chrome.runtime.getURL("tabs/offscreen.html"),
|
||||
reasons: [chrome.offscreen.Reason.IFRAME_SCRIPTING],
|
||||
justification: 'Get RSS in the sandbox for enhanced security.',
|
||||
});
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PlasmoCSConfig } from "plasmo"
|
||||
|
||||
export const config: PlasmoCSConfig = {
|
||||
matches: ["https://www.plasmo.com/*"]
|
||||
matches: ["https://docs.plasmo.com/*"]
|
||||
}
|
||||
|
||||
window.addEventListener("load", () => {
|
||||
@@ -0,0 +1,3 @@
|
||||
export { }
|
||||
|
||||
console.log("HELLO WORLD FROM SANDBOXES")
|
||||
@@ -0,0 +1,9 @@
|
||||
function OffscreenPage() {
|
||||
console.log("HELLO WORLD FROM OFFSCREEN")
|
||||
|
||||
return (
|
||||
<iframe id="sandbox" src="/sandboxes/index.html"></iframe>
|
||||
);
|
||||
}
|
||||
|
||||
export default OffscreenPage;
|
||||
Reference in New Issue
Block a user