From 9b739ce81f62410c03e991cb6bd77b26e3e82507 Mon Sep 17 00:00:00 2001 From: Tijl <85572877+xTTLegend@users.noreply.github.com> Date: Thu, 15 Dec 2022 23:49:01 +0100 Subject: [PATCH] fixes --- popup-func.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/popup-func.js b/popup-func.js index 55a70f7..bd3f39c 100644 --- a/popup-func.js +++ b/popup-func.js @@ -1,17 +1,17 @@ const searchButton = document.getElementById('searchButton'); if (searchButton) { searchButton.addEventListener('click', () => { - searchRedirect('test'); + searchRedirect(); }) } const newButton = document.getElementById('newButton'); if (newButton) { newButton.addEventListener('click', () => { - newRedirect('test'); + newRedirect(); }) } -function searchRedirect(host) { +function searchRedirect() { const request = new XMLHttpRequest(); const url = 'https://url.example.com/rest/v3/short-urls'; request.open('GET', url); @@ -26,7 +26,7 @@ function searchRedirect(host) { } } -function newRedirect(host) { +function newRedirect() { chrome.tabs.query({active: true, lastFocusedWindow: true}, tabs => { let currentUrl = tabs[0].url; const url = 'https://url.example.com/rest/v3/short-urls';