fixes
This commit is contained in:
parent
a48e1f9b40
commit
9b739ce81f
@ -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';
|
||||
|
Reference in New Issue
Block a user