diff --git a/background.js b/background.js index fed0e4c..e64fbcc 100644 --- a/background.js +++ b/background.js @@ -15,6 +15,8 @@ var misPrefixNum=0; var interestLifetimeMilliseconds=2000; // 是否开启mis更新映射表 var misEnableState=true; +// 全局变量,用于设置是否刷新当前active的界面 +// var myInterval=null; // min协议的URI协议头 var minProtocolHeader="min/"; @@ -144,6 +146,17 @@ function addCustomRule(editingRule) { } } +// 刷新正在浏览的浏览器界面 +function refreshActiveTab () { + chrome.tabs.query({active: true}, function(tabs) { + var tabIndex = tabs[0].index; + chrome.tabs.query({}, function(tabs) { + chrome.tabs.reload(tabs[tabIndex].id); + }) + }); + console.log("refresh########"); +} + function express(prefixUri) { // alert("成功加载mis的IP: "+misHost+"; misPrefix: "+misPrefix); // Connect to the forwarder with a WebSocket. @@ -184,7 +197,6 @@ function express(prefixUri) { }else{ // mis没有该前缀对应的映射 } - // alert("really begin 4"); }, onTimeout); } diff --git a/manifest.json b/manifest.json index 94c1d70..b3c3fc6 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "manifest_version": 2, "name": "__MSG_extensionName__", "version": "1.3.17", - "homepage_url": "https://github.com/", + "homepage_url": "https://gitee.com/", "icons": { "20": "static/images/r20.png", "25": "static/images/r25.png",