From be6147aa08e3495bff463005c677600e11ad7268 Mon Sep 17 00:00:00 2001 From: nobody Date: Sun, 21 Jun 2020 07:35:52 +0200 Subject: [PATCH] Removed useless variable --- modules/internal/helpers.js | 3 +-- pages/options/options.js | 3 --- pages/popup/popup.js | 2 +- pages/statistics/statistics.js | 4 ++-- pages/updates/updates.js | 1 - 5 files changed, 4 insertions(+), 9 deletions(-) diff --git a/modules/internal/helpers.js b/modules/internal/helpers.js index dbef19a5..95595747 100644 --- a/modules/internal/helpers.js +++ b/modules/internal/helpers.js @@ -33,7 +33,6 @@ helpers.insertI18nContentIntoDocument = function (document) { translationComplete = true; scriptDirection = helpers.determineScriptDirection(navigator.language); - defaultScriptDirection = helpers.determineScriptDirection('en_US'); i18nElements = document.querySelectorAll('[data-i18n-content]'); i18nElements.forEach(function (i18nElement) { @@ -105,7 +104,7 @@ helpers.normalizeDomain = function (domain) { return domain; }; -helpers.extractDomainFromUrl = function (url = '', normalize) { +helpers.extractDomainFromUrl = function (url, normalize) { if (/^(?!(http[s]?|file):\/\/).*/.test(url)) { return null; diff --git a/pages/options/options.js b/pages/options/options.js index 26159e81..ac0f0c88 100644 --- a/pages/options/options.js +++ b/pages/options/options.js @@ -251,11 +251,8 @@ options._openRuleSet = function({target}) { let urls = mappings; let optionKey = target.getAttribute('data-option'); - let optionType = target.getAttribute('value'); - let textArea = document.getElementById("generated-rules"); let btnCopy = document.getElementById("button-copy-rule-set"); - let content = ""; textArea.style.display = "block"; diff --git a/pages/popup/popup.js b/pages/popup/popup.js index 0bb180b3..4df17de9 100644 --- a/pages/popup/popup.js +++ b/pages/popup/popup.js @@ -360,7 +360,7 @@ popup._createInjectionGroupElement = function (source, cdn) { return injectionGroupElement; }; -popup._createInjectionElement = function (injection, oversized = false) { +popup._createInjectionElement = function (injection) { let injectionElement, filename, name, nameTextNode, noteElement, noteTextNode; diff --git a/pages/statistics/statistics.js b/pages/statistics/statistics.js index 50936bd4..6f26ae87 100644 --- a/pages/statistics/statistics.js +++ b/pages/statistics/statistics.js @@ -45,7 +45,7 @@ statistics._renderNonContextualContents = function () { versionLabelElement.innerText = helpers.formatVersion(version); }; -statistics._renderInjectionPanel = function (statisticData) { +statistics._renderInjectionPanel = function () { let websiteContextElement, injectionOverviewElement; @@ -62,7 +62,7 @@ statistics._renderContextualContents = function () { } }; -statistics._createInjectionOverviewElement = function (statisticData) { +statistics._createInjectionOverviewElement = function () { let divOutline = document.createElement('div'); divOutline.setAttribute('class', 'cdn-list'); diff --git a/pages/updates/updates.js b/pages/updates/updates.js index 34700f59..f9e3eb50 100644 --- a/pages/updates/updates.js +++ b/pages/updates/updates.js @@ -26,7 +26,6 @@ updates._openRuleSet = function({target}) { let urls = mappings; let updateKey = target.getAttribute('data-option'); - let updateType = target.getAttribute('value'); let textArea = document.getElementById("generated-rules"); let btnCopy = document.getElementById("button-copy-rule-set");