From 1bf859bb019366f538c55786b04293a382f6bea6 Mon Sep 17 00:00:00 2001 From: Colin Caine Date: Fri, 2 Mar 2018 17:26:40 +0000 Subject: [PATCH 1/5] Fix #321 --- src/excmds.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/excmds.ts b/src/excmds.ts index 7aac62bf..d2ceb1a0 100644 --- a/src/excmds.ts +++ b/src/excmds.ts @@ -1381,7 +1381,7 @@ export function set(key: string, ...values: string[]) { if (Array.isArray(currentValue)) { config.set(...target, values) - } else if (typeof currentValue === "string") { + } else if (currentValue === undefined || typeof currentValue === "string") { config.set(...target, values.join(' ')) } else { throw "Unsupported setting type!" From fdbf132f4eba26dc7bc7e29eba5bce15139d8cfa Mon Sep 17 00:00:00 2001 From: Colin Caine Date: Fri, 2 Mar 2018 17:28:23 +0000 Subject: [PATCH 2/5] release 1.8.0 --- src/manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/manifest.json b/src/manifest.json index 6ee5cf17..f4e35770 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "Tridactyl", - "version": "1.7.3", + "version": "1.8.0", "icons": { "64": "static/logo/Tridactyl_64px.png", "100": "static/logo/Tridactyl_100px.png", @@ -59,4 +59,4 @@ "strict_min_version": "54.0" } } -} +} \ No newline at end of file From 119758454f2eae7bd459f025d9fb2bf67ca0ab1d Mon Sep 17 00:00:00 2001 From: glacambre Date: Sun, 4 Mar 2018 14:15:26 +0100 Subject: [PATCH 3/5] Add cleanslate.css --- package.json | 1 + scripts/build.sh | 6 +++++ src/commandline_content.ts | 5 +++-- src/hinting.ts | 6 ++--- src/manifest.json | 3 ++- src/static/commandline.html | 1 + src/static/content.css | 22 +++++++++---------- src/static/hint.css | 44 ++++++++++++++++++------------------- 8 files changed, 49 insertions(+), 39 deletions(-) diff --git a/package.json b/package.json index f4225e58..ce8f1a1c 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "@types/node": "^8.0.46", "awesome-typescript-loader": "^3.2.3", "chokidar-cli": "^1.2.0", + "cleanslate": "^0.10.1", "copy-webpack-plugin": "^4.2.0", "jest": "^21.2.1", "shared-git-hooks": "^1.2.1", diff --git a/scripts/build.sh b/scripts/build.sh index e4800353..a433ea14 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -4,10 +4,16 @@ set -e PATH=$(npm bin):"$PATH" export PATH +CLEANSLATE="node_modules/cleanslate/docs/files/cleanslate.css" mkdir -p generated/static scripts/excmds_macros.py scripts/newtab.md.sh +if [ -e "$CLEANSLATE" ] ; then + cp "$CLEANSLATE" build/static/cleanslate.css +else + echo "Couldn't find cleanslate.css. Try running 'npm install'" +fi scripts/make_docs.sh & (webpack --display errors-only && scripts/git_version.sh)& diff --git a/src/commandline_content.ts b/src/commandline_content.ts index 953705b9..6488207b 100644 --- a/src/commandline_content.ts +++ b/src/commandline_content.ts @@ -20,6 +20,7 @@ function init(){ if (cmdline_iframe === undefined) { try { cmdline_iframe = window.document.createElement("iframe") + cmdline_iframe.className = "cleanslate" cmdline_iframe.setAttribute("src", browser.extension.getURL("static/commandline.html")) cmdline_iframe.setAttribute("id", "cmdline_iframe") hide() @@ -36,11 +37,11 @@ init() export function show(){ const height = cmdline_iframe.contentWindow.document.body.offsetHeight + 'px' - cmdline_iframe.setAttribute("style", `height: ${height};`) + cmdline_iframe.setAttribute("style", `height: ${height} !important;`) } export function hide(){ - cmdline_iframe.setAttribute("style", "height: 0px;") + cmdline_iframe.setAttribute("style", "height: 0px !important;") } export function focus(){ diff --git a/src/hinting.ts b/src/hinting.ts index ebf913f8..971177fa 100644 --- a/src/hinting.ts +++ b/src/hinting.ts @@ -25,7 +25,7 @@ const logger = new Logger('hinting') /** Simple container for the state of a single frame's hints. */ class HintState { public focusedHint: Hint - readonly hintHost = html`
` + readonly hintHost = html`
` readonly hints: Hint[] = [] public filter = '' public hintchars = '' @@ -156,8 +156,8 @@ class Hint { /* left: ${rect.left}px; */ /* ` */ this.flag.style.cssText = ` - top: ${window.scrollY + rect.top}px; - left: ${window.scrollX + rect.left}px; + top: ${window.scrollY + rect.top}px !important; + left: ${window.scrollX + rect.left}px !important; ` modeState.hintHost.appendChild(this.flag) target.classList.add('TridactylHintElem') diff --git a/src/manifest.json b/src/manifest.json index f4e35770..4f938f31 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -24,6 +24,7 @@ "content.js" ], "css": [ + "static/cleanslate.css", "static/content.css", "static/hint.css" ], @@ -59,4 +60,4 @@ "strict_min_version": "54.0" } } -} \ No newline at end of file +} diff --git a/src/static/commandline.html b/src/static/commandline.html index 97cf2abb..24b3d858 100644 --- a/src/static/commandline.html +++ b/src/static/commandline.html @@ -1,6 +1,7 @@ + diff --git a/src/static/content.css b/src/static/content.css index e8aaf9c5..c4f947ef 100644 --- a/src/static/content.css +++ b/src/static/content.css @@ -1,13 +1,13 @@ #cmdline_iframe { - position: fixed; - bottom: 0; - left: 0; - z-index: 2147483647; - width: 100%; - height: 0; - border: 0; - padding: 0; - margin: 0; - min-height: 0; - max-height: none; + position: fixed !important; + bottom: 0 !important; + left: 0 !important; + z-index: 2147483647 !important; + width: 100% !important; + height: 0 !important; + border: 0 !important; + padding: 0 !important; + margin: 0 !important; + min-height: 0 !important; + max-height: none !important; } diff --git a/src/static/hint.css b/src/static/hint.css index 3a9ee0fe..273d1e46 100644 --- a/src/static/hint.css +++ b/src/static/hint.css @@ -1,36 +1,36 @@ span.TridactylHint { - position: absolute; - font-family: sans-serif; - font-size: 12px; - font-weight: bold; - text-transform: uppercase; - color: white; - background-color: red; - border-color: ButtonShadow; - border-width: 0px; - min-width: .75em; - border-style: solid; - padding: 0 1pt; - text-align: center; - z-index: 2147483647; + position: absolute !important; + font-family: sans-serif !important; + font-size: 12px !important; + font-weight: bold !important; + text-transform: uppercase !important; + color: white !important; + background-color: red !important; + border-color: ButtonShadow !important; + border-width: 0px !important; + min-width: .75em !important; + border-style: solid !important; + padding: 0 1pt !important; + text-align: center !important; + z-index: 2147483647 !important; } .TridactylHintElem, .TridactylHintActive { - color: black !important; - animation: none; - transition: unset; + color: black !important !important; + animation: none !important; + transition: unset !important; } .TridactylHintElem { - background-color: rgba(255, 255, 0, 0.25); - outline: 1px solid #8F5902; + background-color: rgba(255, 255, 0, 0.25) !important; + outline: 1px solid #8F5902 !important; } .TridactylHintActive { - background-color: #88FF00; - outline: 1px solid #CC0000; + background-color: #88FF00 !important; + outline: 1px solid #CC0000 !important; } div.TridactylHintHost { - position: static !important; + position: static !important !important; } From 7750609e6aff93dea5b9fc954d9c80845ebeb679 Mon Sep 17 00:00:00 2001 From: glacambre Date: Sun, 4 Mar 2018 14:42:35 +0100 Subject: [PATCH 4/5] build.sh: Fix script copying cleanslate.css to potentially non-existing dir --- scripts/build.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index a433ea14..b4f73e08 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -9,13 +9,14 @@ CLEANSLATE="node_modules/cleanslate/docs/files/cleanslate.css" mkdir -p generated/static scripts/excmds_macros.py scripts/newtab.md.sh -if [ -e "$CLEANSLATE" ] ; then - cp "$CLEANSLATE" build/static/cleanslate.css -else - echo "Couldn't find cleanslate.css. Try running 'npm install'" -fi scripts/make_docs.sh & (webpack --display errors-only && scripts/git_version.sh)& wait + +if [ -e "$CLEANSLATE" ] ; then + cp "$CLEANSLATE" build/static/cleanslate.css +else + echo "Couldn't find cleanslate.css. Try running 'npm install'" +fi From 75ad1aedaff84281159e96e4f4d727aef1ab7268 Mon Sep 17 00:00:00 2001 From: Colin Caine Date: Mon, 5 Mar 2018 09:34:27 +0000 Subject: [PATCH 5/5] Revert "release 1.8.0" This reverts commit fdbf132f4eba26dc7bc7e29eba5bce15139d8cfa. --- src/manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/manifest.json b/src/manifest.json index f4e35770..6ee5cf17 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "Tridactyl", - "version": "1.8.0", + "version": "1.7.3", "icons": { "64": "static/logo/Tridactyl_64px.png", "100": "static/logo/Tridactyl_100px.png", @@ -59,4 +59,4 @@ "strict_min_version": "54.0" } } -} \ No newline at end of file +}