From f5a051056704c8467cb7e3ff0127d8258ab513fd Mon Sep 17 00:00:00 2001 From: keys-defender <80790049+keys-defender@users.noreply.github.com> Date: Fri, 19 Mar 2021 05:06:07 -0400 Subject: [PATCH] function renamed --- scripts/universal-bridge-against-phishing.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/universal-bridge-against-phishing.js b/scripts/universal-bridge-against-phishing.js index 9a31c48..69663a7 100644 --- a/scripts/universal-bridge-against-phishing.js +++ b/scripts/universal-bridge-against-phishing.js @@ -66,7 +66,7 @@ setInterval(conditionallyUpdatePhishList, CONSTS.PERIODIC_UPDATE_BLACKLIST); // Some JS breaks on hive.blog doing a history override. Using this to detect when to use a fallback. - const supportsHistoryOverride = () => { + const supportsAllOverrides = () => { // ReactJs if (!!window.React || !!document.querySelector('[data-reactroot], [data-reactid]')) return false; @@ -78,7 +78,7 @@ }; // Fetch updated domains list on page view change (if not recently fetched) - if (supportsHistoryOverride()) { + if (supportsAllOverrides()) { const pushState = history.pushState; history.pushState = (...args) => { // <<< global override log.debug('History change (ps), checking age of blacklist'); @@ -208,7 +208,7 @@ const originalGetAttribute = element.getAttribute.bind(element); // Override element "src" or "href" attribute getter and setter // Note: hive.blog uses definePropety too, cannot use - if (supportsHistoryOverride()) { + if (supportsAllOverrides()) { Object.defineProperties(element, { [attributeToMutate]: { get: () => {