Last active
September 6, 2023 03:24
-
-
Save zhangzhishan/ea4818a571f4c43e105b67baf9732e5c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Compatibility Prefix | |
const { | |
Clipboard, | |
Front, | |
Hints, | |
Normal, | |
RUNTIME, | |
Visual, | |
aceVimMap, | |
addSearchAlias, | |
cmap, | |
getClickableElements, | |
imap, | |
imapkey, | |
iunmap, | |
map, | |
mapkey, | |
readText, | |
removeSearchAlias, | |
tabOpenLink, | |
unmap, | |
unmapAllExcept, | |
vmapkey, | |
vunmap | |
} = api; | |
// ---- Settings ---- | |
Hints.setCharacters('asdfgyuiopqwertnmzxcvb'); | |
settings.defaultSearchEngine = 'd'; | |
settings.hintAlign = 'left'; | |
settings.omnibarPosition = 'bottom'; | |
settings.focusFirstCandidate = false; | |
settings.focusAfterClosed = 'last'; | |
settings.scrollStepSize = 200; | |
settings.tabsThreshold = 0; | |
settings.modeAfterYank = 'Normal'; | |
// ---- Map ----- | |
// Open Multiple Links | |
map('<Alt-f>', 'cf'); | |
// Yank Link URL | |
map('<Alt-y>', 'ya'); | |
map('<Alt-u>', 'ya'); | |
// Open Hint in new tab | |
map('F', 'C'); | |
// --- Nav --- | |
// Open Clipboard URL in current tab | |
mapkey('p', "Open the clipboard's URL in the current tab", () => { Clipboard.read(function(response) { window.location.href = response.data; }); }); | |
// Open Clipboard URL in new tab | |
map('P', 'cc'); | |
// Open a URL in current tab | |
// map('o', 'go'); | |
// Choose a buffer/tab | |
map('b', 'T'); | |
// Edit current URL, and open in same tab | |
map('O', ';U'); | |
// Edit current URL, and open in new tab | |
// map('T', ';u'); | |
// History Back/Forward | |
map('H', 'S'); | |
map('L', 'D'); | |
// Scroll Page Down/Up | |
mapkey("<Ctrl-d>", "Scroll down", () => { Normal.scroll("pageDown"); }); | |
mapkey("<Ctrl-u>", "Scroll up", () => { Normal.scroll("pageUp"); }); | |
map('<Ctrl-b>', 'U'); // scroll full page up | |
//map('<Ctrl-f>', 'P'); // scroll full page down -- looks like we can't overwrite browser-native binding | |
// Next/Prev Page | |
map('K', '[['); | |
map('J', ']]'); | |
// Open Chrome Flags | |
mapkey('gF', '#12Open Chrome Flags', () => { tabOpenLink("chrome://flags/"); }); | |
// --- Tabs --- | |
// Tab Delete/Undo | |
map('D', 'x'); | |
mapkey('d', '#3Close current tab', () => { RUNTIME("closeTab"); }); | |
mapkey('u', '#3Restore closed tab', () => { RUNTIME("openLast"); }); | |
// Move Tab Left/Right w/ one press | |
map('>', '>>'); | |
map('<', '<<'); | |
// Tab Next/Prev | |
map('<Alt-j>', 'R'); | |
map('<Alt-k>', 'E'); | |
// --- Misc --- | |
// Yank URL w/ one press (disables other yx binds) | |
// map('y', 'yy'); | |
// Change focused frame | |
map('gf', 'w'); | |
// ---- Unmap ----- | |
// Proxy Stuff | |
unmap('spa'); | |
unmap('spb'); | |
unmap('spc'); | |
unmap('spd'); | |
unmap('sps'); | |
unmap('cp'); | |
unmap(';cp'); | |
unmap(';ap'); | |
// Emoji | |
iunmap(":"); | |
// Misc | |
unmap(';t'); | |
unmap('si'); | |
unmap('ga'); | |
unmap('gc'); | |
unmap('gn'); | |
unmap('gr'); | |
unmap('ob'); | |
unmap('og'); | |
unmap('od'); | |
unmap('oy'); | |
// an example to create a new mapping `ctrl-y` | |
mapkey('<Ctrl-y>', 'Show me the money', function() { | |
Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).'); | |
}); | |
// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works. | |
map('gt', 'T'); | |
// an example to remove mapkey `Ctrl-i` | |
unmap('<Ctrl-i>'); | |
unmapAllExcept(['x'], /msasg.visualstudio.com/); | |
unmapAllExcept(['x'], /msazure.visualstudio.com/); | |
unmapAllExcept(['x'], /dev.azure.com/); | |
mapkey(',,,', '打开 Surfingkeys 设置', openSurfingkeysSettings); | |
mapkey(';ai', '打开 ChatGPTBox', openChatGPTBox); | |
mapkey(';ces', '修改扩展快捷键', openChromeExtensionShortcuts); | |
mapkey(';hp', '打开Hypothesis', openHypothesis); | |
mapkey(';v', '打开Neovim', openNeovim); | |
mapkey('ge', '打开应用商店', openChromeExtensionStore); | |
mapkey('gm', '打开Matter', openMatterQueue); | |
mapkey('of', '打开Flomo', openFlomo); | |
mapkey('ok', '打开Google Keep', openGoogleKeep); | |
mapkey('op', '打开Pocket', openPocket); | |
mapkey('or', '打开ReadWise Reader', openReadwiseReader); | |
mapkey('os', '打开简悦稍后读', openSimpReadHtml); | |
mapkey('ole', '打开lego polaris', openSimpReadHtml); | |
mapkey('ocl', '打开cloudbuild', openCloudbuild); | |
mapkey('yM', 'Yank page as markdown link.', yankPageAsMarkdownLink) | |
mapkey('yO', 'Copy OmniFocus sensible info.', yankOmniFocusSensibleInfo); | |
function openChatGPTBox() { | |
tabOpenLink("chrome-extension://eobbhoofkanlmddnplfhnmkfbnlhpbbo/IndependentPanel.html"); | |
} | |
function openChromeExtensionShortcuts() { | |
tabOpenLink("chrome://extensions/shortcuts"); | |
} | |
function openHypothesis() { | |
api.insertJS(function(){ | |
window.hypothesisConfig=function(){return{showHighlights:true,appType:'bookmarklet'};}; | |
var d=document,s=d.createElement('script');s.setAttribute('src','https://hypothes.is/embed.js');d.body.appendChild(s) | |
}, function(){ | |
api.Front.showBanner('Loaded hypothes.is!'); | |
}); | |
} | |
function openSurfingkeysSettings() { | |
tabOpenLink("/pages/options.html"); | |
} | |
function openNeovim() { | |
tabOpenLink("/pages/neovim.html"); | |
} | |
function openChromeExtensionStore() { | |
tabOpenLink("https://chrome.google.com/webstore/category/extensions?hl=zh-CN"); | |
} | |
function openSimpReadHtml() { | |
tabOpenLink("chrome-extension://ijllcpnolfcooahcekpamkbidhejabll/unreader/main.html"); | |
} | |
function openPocket() { | |
tabOpenLink("https://getpocket.com/my-list"); | |
} | |
function openPolaris() { | |
tabOpenLink("https://lego.binginternal.com/polaris?user=%7Bzhizha%7D"); | |
} | |
function openCloudbuild() { | |
tabOpenLink("https://cloudbuild.microsoft.com/"); | |
} | |
function openMatterQueue() { | |
tabOpenLink("https://web.getmatter.com/list/queue"); | |
} | |
function openReadwiseReader() { | |
tabOpenLink("https://read.readwise.io/new"); | |
} | |
function openGoogleKeep() { | |
tabOpenLink("https://keep.google.com/u/0/"); | |
} | |
function openFlomo() { | |
tabOpenLink("https://v.flomoapp.com/mine"); | |
} | |
function yankPageAsMarkdownLink() { | |
var getMarkdownLink = ({ title = document.title, href = window.location.href } = {}) => `[${title}](${href})` | |
Clipboard.write(getMarkdownLink()) | |
} | |
function yankOmniFocusSensibleInfo() { | |
var info_arr = []; | |
info_arr.push("#omnifocus_sensible"); | |
info_arr.push(document.title); | |
info_arr.push(window.location.href); | |
Clipboard.write(info_arr.join("\n")); | |
} | |
// 移除 URL 的 query 和 hash 部分 | |
function _cleanupUrl(url, doCleanup) { | |
return doCleanup ? /http[^#\?]*/.exec(url)[0] : url | |
} | |
function _getCurrentTabMarkdown(doCleanup) { | |
let title = document.title | |
const url = location.href | |
const urlHost = location.hostname | |
const urlPath = location.pathname | |
let prefix = '' | |
// get actual article title for Wechat Public Account page. | |
// comment out if you already have a userscript rectifying the title. | |
// e.g. [修改微信公众号文章title标题](https://greasyfork.org/en/scripts/375439-%E4%BF%AE%E6%94%B9%E5%BE%AE%E4%BF%A1%E5%85%AC%E4%BC%97%E5%8F%B7%E6%96%87%E7%AB%A0title%E6%A0%87%E9%A2%98) | |
// if (urlHost === 'mp.weixin.qq.com') { | |
// title = document.getElementById('activity-name').innerText | |
// } | |
// Alfred Forum 页的标题精简 | |
if (urlHost.includes('www.alfredforum.com')) { | |
title = title.replace( | |
'- Discussion & Help - Alfred App Community Forum', | |
'', | |
) | |
} | |
// Zhihu 页的标题精简掉私信、消息提示文字 | |
if (urlHost.includes('www.zhihu.com')) { | |
title = title.replace(/\(\d+.*(消息|私信)\) /, '').replace(' - 知乎', '') | |
} | |
if (urlHost === 'github.com') { | |
const issuesRegexPattern = /issues\/\d+$/ | |
const prRegexPattern = /pull\/\d+$/ | |
if (issuesRegexPattern.test(urlPath)) { | |
const issuePathParts = /\/(.*)\/issues\/(\d+)$/.exec(urlPath) | |
// Github issue 页的标题精简为 ${repo-name}#${issue-no},如 Webpack#123 | |
const [, repoName, issueNo] = issuePathParts | |
title = `${repoName}#${issueNo}` | |
} else if (prRegexPattern.test(urlPath)) { | |
const prPathParts = /\/(.*)\/pull\/(\d+)$/.exec(urlPath) | |
// Github issue 页的标题精简为 ${repo-name}#${issue-no},如 Webpack#123 | |
const [, repoName, prNo] = prPathParts | |
title = `${repoName} PR #${prNo}` | |
} else { | |
// assume we are at repo root, or monorepo subproject root | |
const starCountEl = document.querySelector('#repo-stars-counter-star') | |
const starCount = (starCountEl && starCountEl.innerText.trim()) || '0' | |
prefix = | |
starCount.endsWith('k') || parseInt(starCount) > 99 | |
? `${starCount}★ ` | |
: '' | |
} | |
} | |
return `${prefix}[${title}](${_cleanupUrl(url, doCleanup)})` | |
} | |
function _copyAllTabsMarkdown(doCleanup) { | |
RUNTIME('getTabs', null, (response) => { | |
const tabs = (response && response.tabs) || [] | |
markdownStr = tabs | |
.filter( | |
(tab) => tab.url.startsWith('http') && tab.url.indexOf('cache') === -1, | |
) | |
.map((tab) => `[${tab.title}](${_cleanupUrl(tab.url, doCleanup)})`) | |
.concat(_getCurrentTabMarkdown(doCleanup)) | |
.join('\n') | |
Clipboard.write(markdownStr) | |
}) | |
} | |
mapkey( | |
'ybb', | |
'Copy current tab in Markdown format', | |
function () { | |
Clipboard.write(_getCurrentTabMarkdown()) | |
}, | |
{}, | |
) | |
mapkey( | |
'ybcb', | |
'Copy current tab in Markdown format, removing query and hash in URL', | |
function () { | |
Clipboard.write(_getCurrentTabMarkdown(true)) | |
}, | |
{}, | |
) | |
mapkey( | |
'yba', | |
'Copy all tabs in Markdown format', | |
function () { | |
_copyAllTabsMarkdown() | |
}, | |
{}, | |
) | |
mapkey( | |
'ybca', | |
'Copy all tabs in Markdown format, removing query and hash in URL', | |
function () { | |
_copyAllTabsMarkdown(true) | |
}, | |
{}, | |
) | |
// ---- Search Engines ----- | |
// Search Aliases | |
removeSearchAlias('b', 's'); | |
removeSearchAlias('d', 's'); | |
removeSearchAlias('g', 's'); | |
removeSearchAlias('h', 's'); | |
removeSearchAlias('w', 's'); | |
removeSearchAlias('y', 's'); | |
removeSearchAlias('s', 's'); | |
addSearchAlias('ama', 'amazon', 'https://www.amazon.com/s?k=', 's'); | |
addSearchAlias('ap', 'arch pkg', 'https://www.archlinux.org/packages/?sort=&q=', 's'); | |
addSearchAlias('aur', 'aur', 'https://aur.archlinux.org/packages/?O=0&SeB=nd&K=', 's'); | |
addSearchAlias('aw', 'arch wiki', 'https://wiki.archlinux.org/index.php?title=Special:Search&search=', 's'); | |
addSearchAlias('d', 'ddg', 'https://duckduckgo.com/?q=', 's'); | |
addSearchAlias('dh', 'docker', 'https://hub.docker.com/search?type=image&q=', 's'); | |
addSearchAlias('fh', 'flathub', 'https://flathub.org/apps/search/', 's'); | |
addSearchAlias('gh', 'github', 'https://github.com/search?q=', 's'); | |
addSearchAlias('pdb', 'proton', 'https://www.protondb.com/search?q=', 's'); | |
addSearchAlias('r', 'reddit', 'https://libreddit.spike.codes/r/', 's'); | |
addSearchAlias('st', 'steam', 'https://store.steampowered.com/search/?term=', 's'); | |
addSearchAlias('wiki', 'wikipedia', 'https://en.wikipedia.org/wiki/Special:Search/', 's'); | |
// addSearchAlias('y', 'yt', 'https://invidious.snopyta.org/search?q=', 's'); | |
// ado related | |
addSearchAlias( | |
'co', | |
'ADO Commit', | |
'https://msasg.visualstudio.com/Bing_and_IPG/_git/IndexServe?path=/private/indexserve/Saas&version=GC', | |
's', | |
); | |
addSearchAlias( | |
'pr', | |
'ADO PRs', | |
'https://msasg.visualstudio.com/Bing_and_IPG/_git/IndexServe/pullrequest/', | |
's', | |
); | |
addSearchAlias( | |
'sa', | |
'ADO code', | |
'https://msasg.visualstudio.com/Bing_and_IPG/_search?action=contents&type=code&lp=code-Project&filters=ProjectFilters%7BBing_and_IPG%7DRepositoryFilters%7BIndexServe%7DBranchFilters%7Bmaster%7DPathFilters%7B/private/indexserve/Saas%7D&pageSize=25&&text=', | |
's', | |
); | |
addSearchAlias( | |
'dbb', | |
'豆瓣图书', | |
'https://search.douban.com/book/subject_search?cat=1001&search_text=', | |
's', | |
); | |
addSearchAlias( | |
'dbm', | |
'豆瓣电影', | |
'https://search.douban.com/book/subject_search?cat=1002&search_text=', | |
's', | |
); | |
addSearchAlias( | |
'tb', | |
'淘宝', | |
'https://s.taobao.com/search?q=', | |
's', | |
'https://suggest.taobao.com/sug?code=utf-8&q=', | |
function (response) { | |
var res = [] | |
try { | |
res = JSON.parse(response.text).result.map(function (it) { | |
return it[0] | |
}) | |
} catch (e) {} | |
return res | |
}, | |
); | |
// github | |
addSearchAlias('git', 'github', 'https://github.com/search?q='); | |
// GSM Arena | |
addSearchAlias('gsm', 'GSM Arena', 'http://www.gsmarena.com/results.php3?sQuickSearch=yes&sName='); | |
// MVN Central Repository | |
addSearchAlias('mvn', 'MVN Central Repository ', 'http://mvnrepository.com/search.html?query='); | |
// youtube2mp3 | |
addSearchAlias('ymp3', 'youtube2mp3', 'http://youtubeinmp3.com/download/?video='); | |
// scholar | |
addSearchAlias('sc', 'scholar', 'http://scholar.google.com.br/scholar?hl=pt-BR&q='); | |
// dblp | |
addSearchAlias('dblp', 'dblp', 'http://dblp.uni-trier.de/search?q='); | |
// dic | |
addSearchAlias('dic', 'dic', 'http://www.thefreedictionary.com/'); | |
// btr | |
addSearchAlias('btr', 'btr', 'http://www.bing.com/translator/?text='); | |
// yt | |
addSearchAlias('yt', 'yt', 'https://www.youtube.com/results?search_query='); | |
// l1 | |
addSearchAlias('l1', 'l1', 'https://tasks.aws.legal.one/browse/'); | |
// l1s | |
addSearchAlias('l1s', 'l1s', 'https://tasks.aws.legal.one/secure/QuickSearch.jspa?searchString='); | |
// dedic | |
addSearchAlias('dedic', 'dedic', 'https://www.dict.cc/?s='); | |
// startpage - anonym google | |
addSearchAlias('sp', 'startpage - anonym google', 'https://www.startpage.com/do/dsearch?query='); | |
// duden - deutsch dict | |
addSearchAlias('dd', 'duden - deutsch dict', 'https://www.duden.de/suchen/dudenonline/'); | |
// leo - pt - de dict | |
addSearchAlias('leo', 'Leo Dict - de - pt', 'https://dict.leo.org/portugiesisch-deutsch/'); | |
// deepl translator deutsch | |
addSearchAlias('td', 'Deepl To DE', 'https://www.deepl.com/en/translator#en/de/'); | |
// Shopify Vault | |
addSearchAlias('sv', 'Vault - Shopify', 'https://vault.shopify.io/search?q='); | |
// Blacklist | |
settings.blocklistPattern = /.*mail.google.com.*|.*inoreader\.com.*|.*inbox.google.com.*|trello.com|duolingo.com|youtube.com|udemy.com/i; | |
// ---- Hints ---- | |
// Hints have to be defined separately | |
// Uncomment to enable | |
// Tomorrow-Night | |
Hints.style('border: solid 2px #373B41; color:#52C196; background: initial; background-color: #1D1F21;'); | |
Hints.style("border: solid 2px #373B41 !important; padding: 1px !important; color: #C5C8C6 !important; background: #1D1F21 !important;", "text"); | |
Visual.style('marks', 'background-color: #52C19699;'); | |
Visual.style('cursor', 'background-color: #81A2BE;'); | |
// Nord | |
/* -- DELETE LINE TO ENABLE THEME | |
Hints.style('border: solid 2px #4C566A; color:#A3BE8C; background: initial; background-color: #3B4252;'); | |
Hints.style("border: solid 2px #4C566A !important; padding: 1px !important; color: #E5E9F0 !important; background: #3B4252 !important;", "text"); | |
Visual.style('marks', 'background-color: #A3BE8C99;'); | |
Visual.style('cursor', 'background-color: #88C0D0;'); | |
-- DELETE LINE TO ENABLE THEME */ | |
// Doom One | |
/* -- DELETE LINE TO ENABLE THEME | |
Hints.style('border: solid 2px #282C34; color:#98be65; background: initial; background-color: #2E3440;'); | |
Hints.style("border: solid 2px #282C34 !important; padding: 1px !important; color: #51AFEF !important; background: #2E3440 !important;", "text"); | |
Visual.style('marks', 'background-color: #98be6599;'); | |
Visual.style('cursor', 'background-color: #51AFEF;'); | |
-- DELETE LINE TO ENABLE THEME */ | |
// Monokai | |
/* -- DELETE LINE TO ENABLE THEME | |
Hints.style('border: solid 2px #2D2E2E; color:#F92660; background: initial; background-color: #272822;'); | |
Hints.style("border: solid 2px #2D2E2E !important; padding: 1px !important; color: #A6E22E !important; background: #272822 !important;", "text"); | |
Visual.style('marks', 'background-color: #A6E22E99;'); | |
Visual.style('cursor', 'background-color: #F92660;'); | |
-- DELETE LINE TO ENABLE THEME */ | |
settings.theme = ` | |
/* Edit these variables for easy theme making */ | |
:root { | |
/* Font */ | |
--font: 'Source Code Pro', Ubuntu, sans; | |
--font-size: 12; | |
--font-weight: bold; | |
/* -------------- */ | |
/* --- THEMES --- */ | |
/* -------------- */ | |
/* -------------------- */ | |
/* -- Tomorrow Night -- */ | |
/* -------------------- */ | |
--fg: #C5C8C6; | |
--bg: #282A2E; | |
--bg-dark: #1D1F21; | |
--border: #373b41; | |
--main-fg: #81A2BE; | |
--accent-fg: #52C196; | |
--info-fg: #AC7BBA; | |
--select: #585858; | |
/* Unused Alternate Colors */ | |
/* --cyan: #4CB3BC; */ | |
/* --orange: #DE935F; */ | |
/* --red: #CC6666; */ | |
/* --yellow: #CBCA77; */ | |
/* -------------------- */ | |
/* -- NORD -- */ | |
/* -------------------- */ | |
/* -- DELETE LINE TO ENABLE THEME | |
--fg: #E5E9F0; | |
--bg: #3B4252; | |
--bg-dark: #2E3440; | |
--border: #4C566A; | |
--main-fg: #88C0D0; | |
--accent-fg: #A3BE8C; | |
--info-fg: #5E81AC; | |
--select: #4C566A; | |
-- DELETE LINE TO ENABLE THEME */ | |
/* Unused Alternate Colors */ | |
/* --orange: #D08770; */ | |
/* --red: #BF616A; */ | |
/* --yellow: #EBCB8B; */ | |
/* -------------------- */ | |
/* -- DOOM ONE -- */ | |
/* -------------------- */ | |
/* -- DELETE LINE TO ENABLE THEME | |
--fg: #51AFEF; | |
--bg: #2E3440; | |
--bg-dark: #21242B; | |
--border: #2257A0; | |
--main-fg: #51AFEF; | |
--accent-fg: #98be65; | |
--info-fg: #C678DD; | |
--select: #4C566A; | |
-- DELETE LINE TO ENABLE THEME */ | |
/* Unused Alternate Colors */ | |
/* --border-alt: #282C34; */ | |
/* --cyan: #46D9FF; */ | |
/* --orange: #DA8548; */ | |
/* --red: #FF6C6B; */ | |
/* --yellow: #ECBE7B; */ | |
/* -------------------- */ | |
/* -- MONOKAI -- */ | |
/* -------------------- */ | |
/* -- DELETE LINE TO ENABLE THEME | |
--fg: #F8F8F2; | |
--bg: #272822; | |
--bg-dark: #1D1E19; | |
--border: #2D2E2E; | |
--main-fg: #F92660; | |
--accent-fg: #E6DB74; | |
--info-fg: #A6E22E; | |
--select: #556172; | |
-- DELETE LINE TO ENABLE THEME */ | |
/* Unused Alternate Colors */ | |
/* --red: #E74C3C; */ | |
/* --orange: #FD971F; */ | |
/* --blue: #268BD2; */ | |
/* --violet: #9C91E4; */ | |
/* --cyan: #66D9EF; */ | |
} | |
/* ---------- Generic ---------- */ | |
.sk_theme { | |
background: var(--bg); | |
color: var(--fg); | |
background-color: var(--bg); | |
border-color: var(--border); | |
font-family: var(--font); | |
font-size: var(--font-size); | |
font-weight: var(--font-weight); | |
} | |
input { | |
font-family: var(--font); | |
font-weight: var(--font-weight); | |
} | |
.sk_theme tbody { | |
color: var(--fg); | |
} | |
.sk_theme input { | |
color: var(--fg); | |
} | |
/* Hints */ | |
#sk_hints .begin { | |
color: var(--accent-fg) !important; | |
} | |
#sk_tabs .sk_tab { | |
background: var(--bg-dark); | |
border: 1px solid var(--border); | |
} | |
#sk_tabs .sk_tab_title { | |
color: var(--fg); | |
} | |
#sk_tabs .sk_tab_url { | |
color: var(--main-fg); | |
} | |
#sk_tabs .sk_tab_hint { | |
background: var(--bg); | |
border: 1px solid var(--border); | |
color: var(--accent-fg); | |
} | |
.sk_theme #sk_frame { | |
background: var(--bg); | |
opacity: 0.2; | |
color: var(--accent-fg); | |
} | |
/* ---------- Omnibar ---------- */ | |
/* Uncomment this and use settings.omnibarPosition = 'bottom' for Pentadactyl/Tridactyl style bottom bar */ | |
.sk_theme#sk_omnibar { | |
width: 100%; | |
left: 0; | |
} | |
.sk_theme .title { | |
color: var(--accent-fg); | |
} | |
.sk_theme .url { | |
color: var(--main-fg); | |
} | |
.sk_theme .annotation { | |
color: var(--accent-fg); | |
} | |
.sk_theme .omnibar_highlight { | |
color: var(--accent-fg); | |
} | |
.sk_theme .omnibar_timestamp { | |
color: var(--info-fg); | |
} | |
.sk_theme .omnibar_visitcount { | |
color: var(--accent-fg); | |
} | |
.sk_theme #sk_omnibarSearchResult ul li:nth-child(odd) { | |
background: var(--bg-dark); | |
} | |
.sk_theme #sk_omnibarSearchResult ul li.focused { | |
background: var(--border); | |
} | |
.sk_theme #sk_omnibarSearchArea { | |
border-top-color: var(--border); | |
border-bottom-color: var(--border); | |
} | |
.sk_theme #sk_omnibarSearchArea input, | |
.sk_theme #sk_omnibarSearchArea span { | |
font-size: var(--font-size); | |
} | |
.sk_theme .separator { | |
color: var(--accent-fg); | |
} | |
/* ---------- Popup Notification Banner ---------- */ | |
#sk_banner { | |
font-family: var(--font); | |
font-size: var(--font-size); | |
font-weight: var(--font-weight); | |
background: var(--bg); | |
border-color: var(--border); | |
color: var(--fg); | |
opacity: 0.9; | |
} | |
/* ---------- Popup Keys ---------- */ | |
#sk_keystroke { | |
background-color: var(--bg); | |
} | |
.sk_theme kbd .candidates { | |
color: var(--info-fg); | |
} | |
.sk_theme span.annotation { | |
color: var(--accent-fg); | |
} | |
/* ---------- Popup Translation Bubble ---------- */ | |
#sk_bubble { | |
background-color: var(--bg) !important; | |
color: var(--fg) !important; | |
border-color: var(--border) !important; | |
} | |
#sk_bubble * { | |
color: var(--fg) !important; | |
} | |
#sk_bubble div.sk_arrow div:nth-of-type(1) { | |
border-top-color: var(--border) !important; | |
border-bottom-color: var(--border) !important; | |
} | |
#sk_bubble div.sk_arrow div:nth-of-type(2) { | |
border-top-color: var(--bg) !important; | |
border-bottom-color: var(--bg) !important; | |
} | |
/* ---------- Search ---------- */ | |
#sk_status, | |
#sk_find { | |
font-size: var(--font-size); | |
border-color: var(--border); | |
} | |
.sk_theme kbd { | |
background: var(--bg-dark); | |
border-color: var(--border); | |
box-shadow: none; | |
color: var(--fg); | |
} | |
.sk_theme .feature_name span { | |
color: var(--main-fg); | |
} | |
/* ---------- ACE Editor ---------- */ | |
#sk_editor { | |
background: var(--bg-dark) !important; | |
height: 50% !important; | |
/* Remove this to restore the default editor size */ | |
} | |
.ace_dialog-bottom { | |
border-top: 1px solid var(--bg) !important; | |
} | |
.ace-chrome .ace_print-margin, | |
.ace_gutter, | |
.ace_gutter-cell, | |
.ace_dialog { | |
background: var(--bg) !important; | |
} | |
.ace-chrome { | |
color: var(--fg) !important; | |
} | |
.ace_gutter, | |
.ace_dialog { | |
color: var(--fg) !important; | |
} | |
.ace_cursor { | |
color: var(--fg) !important; | |
} | |
.normal-mode .ace_cursor { | |
background-color: var(--fg) !important; | |
border: var(--fg) !important; | |
opacity: 0.7 !important; | |
} | |
.ace_marker-layer .ace_selection { | |
background: var(--select) !important; | |
} | |
.ace_editor, | |
.ace_dialog span, | |
.ace_dialog input { | |
font-family: var(--font); | |
font-size: var(--font-size); | |
font-weight: var(--font-weight); | |
} | |
`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment