From 6afbe6ac92c835eaeeb28190f07f9fa5092c9672 Mon Sep 17 00:00:00 2001 From: Kyryl <91323838+kirizdev@users.noreply.github.com> Date: Mon, 13 Feb 2023 18:46:42 +0000 Subject: Refactor createList function --- src/pages/options/index.js | 125 +++++++++++++++++++++++---------------------- 1 file changed, 63 insertions(+), 62 deletions(-) (limited to 'src') diff --git a/src/pages/options/index.js b/src/pages/options/index.js index f122f3fc..3f37d829 100644 --- a/src/pages/options/index.js +++ b/src/pages/options/index.js @@ -181,68 +181,69 @@ async function processCustomInstances(frontend, document) { } function createList(frontend, networks, document, redirects, blacklist) { - for (const network in networks) { - if (redirects[frontend]) { - if (redirects[frontend][network].length > 0) { - document.getElementById(frontend).getElementsByClassName("custom-instance")[0].placeholder = redirects[frontend].clearnet[0] - document.getElementById(frontend) - .getElementsByClassName(network)[0] - .getElementsByClassName("checklist")[0] - .innerHTML = [ - `