From 0d0d46e59895d84998d42a88063c359db8a54242 Mon Sep 17 00:00:00 2001 From: Front <27463495+Frontesque@users.noreply.github.com> Date: Sat, 27 Nov 2021 13:13:51 -0500 Subject: [PATCH] :red_circle: Chrome Extension Popup Redesign --- Extensions/chrome/popup.css | 37 +++++++++++++++++++++++------------- Extensions/chrome/popup.html | 32 +++++++++++++++++++++---------- Extensions/chrome/popup.js | 27 +++++++++++++++++++++++++- 3 files changed, 72 insertions(+), 24 deletions(-) diff --git a/Extensions/chrome/popup.css b/Extensions/chrome/popup.css index d8baca6..08ede4d 100644 --- a/Extensions/chrome/popup.css +++ b/Extensions/chrome/popup.css @@ -1,15 +1,26 @@ +/* Variables */ +:root { + --background: #111; + --primary: #ff4444; + --secondary: #272727; + --white: #fff; +} + +/* Window Styling */ +html,body { + background-color: var(--background); + color: var(--white); + min-width: 300px; + padding: 0.5em; +} + button { - height: 30px; - width: 30px; - outline: none; - margin: 10px; + color: var(--white); + background: var(--secondary); + cursor: pointer; + padding: 5px 16px; border: none; - border-radius: 2px; -} - -button.current { - box-shadow: 0 0 0 2px white, - 0 0 0 4px black; -} - - + border-radius: 4px; + font-weight: 500; + box-shadow: 0 2px 4px -1px rgb(0 0 0 / 20%), 0 4px 5px 0 rgb(0 0 0 / 14%), 0 1px 10px 0 rgb(0 0 0 / 12%); +} \ No newline at end of file diff --git a/Extensions/chrome/popup.html b/Extensions/chrome/popup.html index 0c17331..29e67ad 100644 --- a/Extensions/chrome/popup.html +++ b/Extensions/chrome/popup.html @@ -1,12 +1,24 @@ - - - - - - - - -

Returns ability to see dislikes

- + + + + Return Youtube Dislike + + + + + +
+ Logo +

Return Youtube Dislike

+

by Dmitrii Selivanov & Community

+ + + + +
+ + + + diff --git a/Extensions/chrome/popup.js b/Extensions/chrome/popup.js index 0507499..48fd9a9 100644 --- a/Extensions/chrome/popup.js +++ b/Extensions/chrome/popup.js @@ -1,4 +1,28 @@ -/* popup-script.js */ +/* Config */ +const config = { + links: { + website: 'https://returnyoutubedislike.com', + github: 'https://github.com/Anarios/return-youtube-dislike', + discord: 'https://discord.gg/mYnESY4Md5' + } +}; + +/* Links */ +document.getElementById('link_website').addEventListener('click', () => { + chrome.tabs.create({url: config.links.website}); +}); + +document.getElementById('link_github').addEventListener('click', () => { + chrome.tabs.create({url: config.links.github}); +}); + +document.getElementById('link_discord').addEventListener('click', () => { + chrome.tabs.create({url: config.links.discord}); +}); + + + +/* popup-script.js document.querySelector('#login') .addEventListener('click', function () { chrome.runtime.sendMessage({ message: 'get_auth_token' }); @@ -7,3 +31,4 @@ document.querySelector('#login') document.querySelector("#log_off").addEventListener("click", function () { chrome.runtime.sendMessage({ message: "log_off" }); }); +*/