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