From 233a000b83edd27874b52ce5dd9761bd8b6d3d2a Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 8 Apr 2021 09:09:05 +0300 Subject: [PATCH] remove the unnecessary change --- content/install-hook-usercss.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/install-hook-usercss.js b/content/install-hook-usercss.js index dfaa8e59..42352377 100644 --- a/content/install-hook-usercss.js +++ b/content/install-hook-usercss.js @@ -5,11 +5,11 @@ if (typeof window.oldCode !== 'string') { window.oldCode = (document.querySelector('body > pre') || document.body).textContent; chrome.runtime.onConnect.addListener(port => { if (port.name !== 'downloadSelf') return; - port.onMessage.addListener(async ({id, force, timer}) => { + port.onMessage.addListener(async ({id, force}) => { const msg = {id}; try { const code = await (await fetch(location.href, {mode: 'same-origin'})).text(); - if ((code !== window.oldCode || force) || !(timer && code === window.oldCode)) { + if (code !== window.oldCode || force) { msg.code = window.oldCode = code; } } catch (error) {