mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 17:11:40 -05:00
Don't load all themes into every tab
This commit is contained in:
parent
90dd599904
commit
1d9380d183
9 changed files with 21 additions and 14 deletions
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
imports=$(find src/static/themes -name '*.css'| awk -F"/" '{ printf "@import url('\''../%s/%s/%s'\'');\n", $3, $4, $5 }')
|
||||
|
||||
|
||||
for css in build/static/css/*.css; do
|
||||
printf '%s\n%s\n' "$imports" "$(cat "$css")" > "$css"
|
||||
done
|
|
@ -67,7 +67,6 @@ if [ "$1" = "--old-native" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
scripts/bodgecss.sh
|
||||
scripts/authors.sh
|
||||
|
||||
if [ -e "$CLEANSLATE" ] ; then
|
||||
|
|
|
@ -46,8 +46,14 @@ export async function theme(element) {
|
|||
}
|
||||
|
||||
// Insert custom css if needed
|
||||
if (newTheme !== "default" && !THEMES.includes(newTheme)) {
|
||||
customCss.code = await config.getAsync("customthemes", newTheme)
|
||||
if (newTheme !== "default") {
|
||||
customCss.code = THEMES.includes(newTheme)
|
||||
? "@import url('" +
|
||||
browser.runtime.getURL(
|
||||
"static/themes/" + newTheme + "/" + newTheme + ".css",
|
||||
) +
|
||||
"');"
|
||||
: await config.getAsync("customthemes", newTheme)
|
||||
if (customCss.code) {
|
||||
await browserBg.tabs.insertCSS(await ownTabId(), customCss)
|
||||
insertedCSS = true
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
@import url("../themes/default/default.css");
|
||||
|
||||
/* Adapted from https://css-tricks.com/snippets/css/star-wars-crawl-text/ */
|
||||
body {
|
||||
width: 100%;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
@import url("../themes/default/default.css");
|
||||
|
||||
body {
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
@import url("../themes/default/default.css");
|
||||
|
||||
#cmdline_iframe {
|
||||
position: fixed !important;
|
||||
bottom: 0 !important;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
@import url("../themes/default/default.css");
|
||||
|
||||
span.TridactylHint {
|
||||
position: absolute !important;
|
||||
font-family: var(--tridactyl-hintspan-font-family) !important;
|
||||
|
@ -47,5 +49,5 @@ span.TridactylJSHint {
|
|||
background-color: var(--tridactyl-hintspan-js-background) !important;
|
||||
}
|
||||
.TridactylKilledElem {
|
||||
display: none !important;
|
||||
display: none !important;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
@import url("../themes/default/default.css");
|
||||
|
||||
body {
|
||||
font-family: var(--tridactyl-font-family-sans);
|
||||
font-size: var(--tridactyl-font-size);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
@import url("../themes/default/default.css");
|
||||
|
||||
#TridactylViewsourceElement {
|
||||
position: absolute !important;
|
||||
/* This is the z-index of hint.css and content.css -1 */
|
||||
|
|
Loading…
Add table
Reference in a new issue