Skip to content

Commit

Permalink
🐛 修复在sandbox页执行BroadcastChannel某些浏览器会报错 #107
Browse files Browse the repository at this point in the history
  • Loading branch information
CodFrm committed Nov 10, 2022
1 parent 62c2f47 commit c4d4de4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
27 changes: 17 additions & 10 deletions build/assets/template/sandbox.html
@@ -1,12 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>

</body>
</html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script>
// 某些版本浏览器会因为sandbox中引用了dexie执行此方法导致报错,这里mock一个假的
window.BroadcastChannel = function () {
return {
postMessage: function () {},
close: function () {},
};
};
</script>
<title>Document</title>
</head>
<body></body>
</html>
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "scriptcat",
"version": "0.10.0-beta.1",
"version": "0.10.0-beta.2",
"description": "脚本猫,一个可以执行用户脚本的浏览器扩展,万物皆可脚本化,让你的浏览器可以做更多的事情!",
"author": "CodFrm",
"license": "GPLv3",
Expand Down
2 changes: 1 addition & 1 deletion src/app/const.ts
@@ -1,4 +1,4 @@
export const ExtVersion = "0.10.0-beta.1";
export const ExtVersion = "0.10.0-beta.2";

export const Server = "https://sc.icodef.com/";

Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "ScriptCat",
"version": "0.10.0.1020",
"version": "0.10.0.1030",
"author": "CodFrm",
"description": "脚本猫,一个用户脚本管理器,支持后台脚本、定时脚本、页面脚本,可编写脚本每天帮你自动处理事务.",
"options_ui": {
Expand Down

0 comments on commit c4d4de4

Please sign in to comment.