summaryrefslogtreecommitdiff
path: root/ext/offscreen.html
diff options
context:
space:
mode:
authorjbukl <noreply@github.com>2023-10-20 02:37:47 -0400
committerjbukl <noreply@github.com>2023-10-20 15:25:52 -0400
commit9a39d0a7e2896edd4a6deebad00b8550cfffc15b (patch)
treeab4aa25d9c89856066ae9d1c347da3ad9bb6ea4e /ext/offscreen.html
parentc3be9af7b6f00dad7107fcdae60a8004cc81936a (diff)
fix: chromium clipboard access
on chromium, backend calls to clipboardGet are forwarded to an offscreen script
Diffstat (limited to 'ext/offscreen.html')
-rw-r--r--ext/offscreen.html40
1 files changed, 40 insertions, 0 deletions
diff --git a/ext/offscreen.html b/ext/offscreen.html
new file mode 100644
index 00000000..85576998
--- /dev/null
+++ b/ext/offscreen.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width,initial-scale=1">
+ <title>Offscreen</title>
+ <link rel="icon" type="image/png" href="/images/icon16.png" sizes="16x16">
+ <link rel="icon" type="image/png" href="/images/icon19.png" sizes="19x19">
+ <link rel="icon" type="image/png" href="/images/icon32.png" sizes="32x32">
+ <link rel="icon" type="image/png" href="/images/icon38.png" sizes="38x38">
+ <link rel="icon" type="image/png" href="/images/icon48.png" sizes="48x48">
+ <link rel="icon" type="image/png" href="/images/icon64.png" sizes="64x64">
+ <link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
+ <link rel="stylesheet" type="text/css" href="/css/background.css">
+</head>
+<body>
+
+<textarea id="clipboard-paste-target"></textarea>
+
+<!-- Scripts -->
+<script src="/js/core.js"></script>
+
+<script src="/js/yomichan.js"></script>
+
+<script src="/js/comm/clipboard-reader.js"></script>
+<script src="/js/extension/environment.js"></script>
+
+<script src="/js/offscreen/offscreen.js"></script>
+<script src="/js/offscreen/offscreen-main.js"></script>
+
+<!--
+ Due to a Firefox bug, this next element is purposefully terminated incorrectly.
+ This element must appear directly inside the <body> element, and it must not be closed properly.
+ https://bugzilla.mozilla.org/show_bug.cgi?id=1603985
+-->
+<!-- [html-validate-disable close-order] -->
+<div id="clipboard-rich-content-paste-target" contenteditable="true">
+
+</body>
+</html>