Skip to content

Commit

Permalink
v0.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
CodFrm committed Sep 6, 2021
1 parent 8f0af15 commit a6cd36f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion build/scriptcat/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "ScriptCat",
"version": "0.5.0",
"version": "0.5.1",
"description": "脚本猫,一个用户脚本的框架,可编写脚本每天帮你自动处理事务.",
"background": {
"page": "background.html"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scriptcat",
"version": "0.5.0",
"version": "0.5.1",
"description": "脚本猫,一个可以执行用户脚本的浏览器扩展,万物皆可脚本化,让你的浏览器可以做更多的事情!",
"scripts": {
"test": "jest",
Expand Down
2 changes: 1 addition & 1 deletion src/apps/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const ExtVersion = "0.5.0";
export const ExtVersion = "0.5.1";

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

11 changes: 0 additions & 11 deletions src/apps/script/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,6 @@ export class ScriptManager {

protected resource = new ResourceManager();

constructor() {
chrome.contextMenus.create({
id: 'script-cat',
title: "ScriptCat",
contexts: ['all'],
onclick: () => {
console.log('exec script');
},
});
}

protected changePort = new Map<any, chrome.runtime.Port>();
public listenEvent() {
// 监听值修改事件,并发送给全局
Expand Down
9 changes: 9 additions & 0 deletions src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ InitApp({
Cache: new MapCache(),
});

chrome.contextMenus.create({
id: 'script-cat',
title: "ScriptCat",
contexts: ['all'],
onclick: () => {
console.log('exec script');
},
});

let scripts = new ScriptManager();
let grant = BackgroundGrant.SingleInstance(
scripts,
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function isFirefox() {
}

export function SendLogger(level: LOGGER_LEVEL, origin: string, msg: string, title: string = "", scriptId?: number) {
top.postMessage(
top!.postMessage(
{
action: Logger,
data: {
Expand Down

0 comments on commit a6cd36f

Please sign in to comment.