From 20012c5d6f67745bc4430ab6df67ab2cf840f405 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Tue, 15 May 2018 17:54:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'WebIDE/enhance.user.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebIDE/enhance.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebIDE/enhance.user.js b/WebIDE/enhance.user.js index e8befd4..f54b3a8 100644 --- a/WebIDE/enhance.user.js +++ b/WebIDE/enhance.user.js @@ -13,7 +13,7 @@ 'use strict'; var id = setInterval(function (){ if (document.getElementsByClassName('ide-container')[0]) { - document.onbeforeunload = function () { return false; } + window.onbeforeunload = function () { return false; } console.log('已阻止 Ctrl + W 关闭页面...') clearInterval(id); }