Skip to content

Commit

Permalink
tweak to dark mode and handle localhost as well as bt.org urls
Browse files Browse the repository at this point in the history
  • Loading branch information
tconfrey committed Dec 11, 2024
1 parent a2e2d66 commit c9975d6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
12 changes: 7 additions & 5 deletions extension/popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
--btHeaderBackground: linear-gradient(180deg, #F1F1F1 0%, #C3CBCB 52.6%, #C8CFD0 100%);
--btBodyBackground: linear-gradient(180deg, rgba(196, 196, 196, 0.28) 0%, rgba(196, 196, 196, 0.3) 14.58%, rgba(196, 196, 196, 0.1) 100%);
--btTextColor: #0C4F6B;
--btBackground: #bed8be;
--btBackground: white;

--btHighlightColor: #cec;
--btSelected: #7bb07b;
Expand All @@ -46,8 +46,7 @@
--btInputForeground: white;
--awesompleteBackground: #566564; /*linear-gradient(to bottom, black, hsla(0,0%,0%,.6));*/

--btBackground: #bed8be;

--btBackground: #c3cac3;
}


Expand All @@ -58,7 +57,7 @@ body {
padding-bottom: 30px;
overflow: hidden;
margin: 0px;
background: white;
background: var(--btBackground);

font-family: var(--btFont);
font-style: normal;
Expand Down Expand Up @@ -99,12 +98,14 @@ h2 {
font-weight: 700;
font-size: 12px;
line-height: 14px;
color: #0C4F6B;
}
h3 {
font-weight: 400;
font-size: 12px;
line-height: 14px;
margin-bottom: 6px;
color: #0C4F6B;
}
.tgPages {
display: none;
Expand All @@ -119,6 +120,7 @@ hr {
label {
position: relative;
top: -3px;
color: #0C4F6B;
}
#saveSpan {
float:left;
Expand Down Expand Up @@ -188,7 +190,7 @@ input[type=text], textarea {
margin-bottom: -5px;
margin-right: 15px;
font-style: italic;
color: var(--btTextColor);
color: #0C4F6B;
display: none;
}
.awesomplete {
Expand Down
5 changes: 3 additions & 2 deletions extension/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,13 @@ function openTopicManager(home = 'WINDOW', location) {
(tabs => {if (tabs.length) chrome.tabs.remove(tabs.map(tab => tab.id));})
);

// Get server url from the manifest object. nb manifest needs app/* so need to strip *
// Get server url from the manifest object, add '${version}/app' unless local. nb manifest needs app/* so need to strip *
const manifest = chrome.runtime.getManifest();
const contentScripts = manifest.content_scripts;
const match = contentScripts[0].matches[0];
const localhost = match.includes('localhost');
const version = manifest.version;
const url = match.replace(/\*+$/, '') + version + '/app';
const url = match.replace(/\*+$/, '') + (localhost ? '' : (version + '/app'));

console.log('loading from ', url);

Expand Down

0 comments on commit c9975d6

Please sign in to comment.