From 536dcb3abcd44f9802c2bd7705189912b15b756d Mon Sep 17 00:00:00 2001 From: glacambre Date: Sun, 3 Feb 2019 08:55:40 +0100 Subject: [PATCH] css_utils.ts: Add `statuspanel` rule Related issue: https://github.com/tridactyl/tridactyl/issues/1284#issuecomment-459488419 --- src/excmds.ts | 11 +++++++++-- src/lib/css_util.ts | 10 ++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/excmds.ts b/src/excmds.ts index fd850a04..7fafaedc 100644 --- a/src/excmds.ts +++ b/src/excmds.ts @@ -356,6 +356,13 @@ export async function guiset_quiet(rule: string, option: string) { * - top-left * - top-right * + * - statuspanel (hoverlink + the indicator that appears when a website is loading) + * - none + * - left + * - right + * - top-left + * - top-right + * * If you want to use guiset in your tridactylrc, you might want to use [[guiset_quiet]] instead. */ //#background @@ -2275,12 +2282,12 @@ export async function winopen(...args: string[]) { browser.windows.create(createData) } -/** +/** * Close a tab. * * @param id - The window id. Defaults to the id of the current window. * - * Example: `winclose + * Example: `winclose */ //#background export async function winclose(...ids: string[]) { diff --git a/src/lib/css_util.ts b/src/lib/css_util.ts index b945ea69..3bdc1121 100644 --- a/src/lib/css_util.ts +++ b/src/lib/css_util.ts @@ -36,6 +36,16 @@ export function findCssRules( * */ export const potentialRules = { + statuspanel: { + name: `#statuspanel`, + options: { + none: `display: none !important;`, + right: `right: 0; display: inline;`, + left: ``, + "top-left": `top: 2em; z-index: 2; display: inline;`, + "top-right": `top: 2em; z-index: 2; right: 0; display: inline;`, + }, + }, hoverlink: { name: `statuspanel[type="overLink"], #statuspanel[type="overLink"]`, options: {