更新 'WebIDE/enhance.user.js'
This commit is contained in:
parent
f210682c5b
commit
e83f34c885
@ -11,10 +11,13 @@
|
|||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
'use strict';
|
'use strict';
|
||||||
setTimeout(function (){
|
var id = setInterval(function (){
|
||||||
|
if (document.getElementsByClassName('ide-container')[0]) {
|
||||||
window.onbeforeunload = function () { return false; }
|
window.onbeforeunload = function () { return false; }
|
||||||
console.log('已阻止 Ctrl + W 关闭页面...')
|
console.log('已阻止 Ctrl + W 关闭页面...')
|
||||||
}, 1000)
|
clearInterval(id);
|
||||||
|
}
|
||||||
|
}, 300)
|
||||||
var dqKeys = function (keys, isOrder, sucFuc, cancelFuc) {
|
var dqKeys = function (keys, isOrder, sucFuc, cancelFuc) {
|
||||||
return new dqKeys.fn.init(keys, isOrder, sucFuc, cancelFuc);
|
return new dqKeys.fn.init(keys, isOrder, sucFuc, cancelFuc);
|
||||||
}
|
}
|
||||||
@ -97,11 +100,12 @@
|
|||||||
document.addEventListener(ev, fn, bool);
|
document.addEventListener(ev, fn, bool);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
dqKeys.fn.init.prototype = dqKeys.fn;
|
dqKeys.fn.init.prototype = dqKeys.fn;
|
||||||
dqKeys({'alt':18,'w':87}, true, function(){
|
dqKeys({'alt':18,'w':87}, true, function(){},function(){
|
||||||
},function(){
|
var activeTab = document.getElementsByClassName('tab-label active')[0];
|
||||||
document.getElementsByClassName('tab-label active')[0].childNodes[2].childNodes[0].click();
|
if (activeTab) {
|
||||||
|
activeTab.childNodes[2].childNodes[0].click();
|
||||||
|
}
|
||||||
}).listenkeys();
|
}).listenkeys();
|
||||||
})();
|
})();
|
||||||
|
Loading…
Reference in New Issue
Block a user