mirror of
https://gitee.com/willfree/MINResolveV2.git
synced 2026-06-03 08:16:55 +08:00
尝试用setInterval及chrome.tabs.query的方法解决初次访问Mis时的卡顿问题,但失败了
This commit is contained in:
+13
-1
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user