From 93b4b64ae92298b639ced5255bce45bc7fa8e38a Mon Sep 17 00:00:00 2001 From: WarningImHack3r <43064022+WarningImHack3r@users.noreply.github.com> Date: Sun, 30 Jul 2023 21:39:30 +0200 Subject: [PATCH 1/2] Change button icon, fix popup and double quote --- plugin/useful-forks.js | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/plugin/useful-forks.js b/plugin/useful-forks.js index d50d001a..074cd55a 100644 --- a/plugin/useful-forks.js +++ b/plugin/useful-forks.js @@ -1,29 +1,31 @@ function getRepoUrl() { - const pathComponents = window.location.pathname.split('/'); + const pathComponents = window.location.pathname.split("/"); const user = pathComponents[1], repo = pathComponents[2]; return `https://useful-forks.github.io/?repo=${user}/${repo}`; } function setBtnUrl() { const button = document.getElementById(UF_BTN_ID); - button.addEventListener('click', () => { - window.open(getRepoUrl(), '_blank'); + button.addEventListener("click", () => { + window.open(getRepoUrl(), "_blank"); }); } function createUsefulBtn() { const li = document.createElement("li"); - const content = `