From 3906dbfce8344a04397ba71f47cf30cdc21694be Mon Sep 17 00:00:00 2001 From: eight Date: Wed, 13 Feb 2019 10:46:47 +0800 Subject: [PATCH] Fix: hide live reload checkbox according to installationUrl --- install-usercss/install-usercss.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-usercss/install-usercss.js b/install-usercss/install-usercss.js index 2361112b..afbd6419 100644 --- a/install-usercss/install-usercss.js +++ b/install-usercss/install-usercss.js @@ -335,7 +335,7 @@ // live reload const setLiveReload = $('.live-reload input[type=checkbox]'); - if (updateUrl.protocol !== 'file:') { + if (!installationUrl || !installationUrl.startsWith('file:')) { setLiveReload.parentNode.remove(); } else { setLiveReload.addEventListener('change', () => {