diff --git a/chromium/background.js b/chromium/background.js index c733341..214f4ed 100644 --- a/chromium/background.js +++ b/chromium/background.js @@ -147,3 +147,28 @@ chrome.runtime.onInstalled.addListener(() => { } }); }); + + +chrome.commands.onCommand.addListener((command) => { + chrome.storage.local.get('group', function (result) { + if (!result || !result.group) return; + + if (command === "star_group" && result.group.Star ) { + // open a new tab with custom_page + chrome.tabs.create({ url: "./custom_page/custom_page.html?Star" }); + + } + if (command === "sailing_group" && result.group.Sailing ) { + + chrome.tabs.create({ url: "./custom_page/custom_page.html?Sailing" }); + } + if (command === "flower_group" && result.group.Flower ) { + + chrome.tabs.create({ url: "./custom_page/custom_page.html?Flower" }); + } + if (command === "coffee_group" && result.group.Coffee ) { + + chrome.tabs.create({ url: "./custom_page/custom_page.html?Coffee" }); + } + }) +}); \ No newline at end of file diff --git a/chromium/custom_page/custom_page.css b/chromium/custom_page/custom_page.css index ba86f3a..0294418 100644 --- a/chromium/custom_page/custom_page.css +++ b/chromium/custom_page/custom_page.css @@ -28,6 +28,7 @@ button { button:hover { color: #D7716E; + cursor: pointer; } #iframeContainer { @@ -80,6 +81,7 @@ button:hover { .iframe-title-bar button:hover { color: #D7716E; + cursor: pointer; } .iframe-title-bar span:hover { @@ -130,7 +132,6 @@ input[type="number"] { /* Change the fill color of the g element when hovering over the svg */ svg:hover #Dribbble-Light-Preview { fill: #D7716E; - /* Change to the color you want on hover */ } #Layer_1 { @@ -143,14 +144,16 @@ svg:hover #Dribbble-Light-Preview { body.light-mode .iframe-title-bar { - background-color: white; /* Simple white background for light mode */ - color: black; /* Black text for better contrast in light mode */ + background-color: white; + /* Simple white background for light mode */ + color: black; + /* Black text for better contrast in light mode */ background-image: none; - } - - body.dark-mode .iframe-title-bar { +} + + +body.dark-mode .iframe-title-bar { background-color: rgb(28 28 30 / var(--un-bg-opacity)); background-image: radial-gradient(ellipse 80% 80% at 50% -30%, #f871714d, #fff0); color: rgb(212 212 212 / var(--un-text-opacity)); - } - \ No newline at end of file +} diff --git a/chromium/custom_page/custom_page.html b/chromium/custom_page/custom_page.html index 9fcb477..4bb929d 100644 --- a/chromium/custom_page/custom_page.html +++ b/chromium/custom_page/custom_page.html @@ -30,7 +30,7 @@ - -