Skip to content

Instantly share code, notes, and snippets.

@jumplee
Created May 16, 2022 03:44
Show Gist options
  • Save jumplee/2a65b5d0631c305884c8ca6ecbde00b7 to your computer and use it in GitHub Desktop.
Save jumplee/2a65b5d0631c305884c8ca6ecbde00b7 to your computer and use it in GitHub Desktop.
surfing配置
// an example to create a new mapping `ctrl-y`
api.mapkey('<ctrl-y>', 'Show me the money', function() {
api.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.
api.map('gt', 'T');
api.addSearchAlias('s', 'stackoverflow', 'http://stackoverflow.com/search?q=', 's');
api.mapkey('os', '#8Open Search with alias b', function() {
api.Front.openOmnibar({type: "SearchEngine", extra: "s"});
});
api.addSearchAlias('j', '掘金', 'https://juejin.cn/search?query=', 's');
api.mapkey('oj', '#8Open Search with alias b', function() {
api.Front.openOmnibar({type: "SearchEngine", extra: "j"});
});
api.addSearchAlias('t', 'taobao', 'https://s.taobao.com/search?q=', 's');
api.mapkey('ot', '#8Open Search with alias t', function() {
api.Front.openOmnibar({type: "SearchEngine", extra: "t"});
});
// 默认
settings.theme = `
.sk_theme {
font-family: Input Sans Condensed, Charcoal, sans-serif;
font-size: 10pt;
background: #24272e;
color: #abb2bf;
}
.sk_theme tbody {
color: #fff;
}
.sk_theme input {
color: #d0d0d0;
}
.sk_theme .url {
color: #61afef;
}
.sk_theme .annotation {
color: #56b6c2;
}
.sk_theme .omnibar_highlight {
color: #528bff;
}
.sk_theme .omnibar_timestamp {
color: #e5c07b;
}
.sk_theme .omnibar_visitcount {
color: #98c379;
}
.sk_theme #sk_omnibarSearchResult ul li:nth-child(odd) {
background: #303030;
}
.sk_theme #sk_omnibarSearchResult ul li.focused {
background: #3e4452;
}
#sk_status, #sk_find {
font-size: 20pt;
}`;
// 浅灰色
settings.theme = `
.sk_theme {
font-family: SauceCodePro Nerd Font, Consolas, Menlo, monospace;
font-size: 10pt;
background: #f0edec;
color: #2c363c;
}
.sk_theme tbody {
color: #f0edec;
}
.sk_theme input {
color: #2c363c;
}
.sk_theme .url {
color: #1d5573;
}
.sk_theme .annotation {
color: #2c363c;
}
.sk_theme .omnibar_highlight {
color: #88507d;
}
.sk_theme #sk_omnibarSearchResult ul li:nth-child(odd) {
background: #f0edec;
}
.sk_theme #sk_omnibarSearchResult ul li.focused {
background: #cbd9e3;
}
#sk_status,
#sk_find {
font-size: 10pt;
}
`;
// 黑色
settings.theme = `
.sk_theme {
font-family: Input Sans Condensed, Charcoal, sans-serif;
font-size: 10pt;
background: #282828;
color: #ebdbb2;
}
.sk_theme tbody {
color: #b8bb26;
}
.sk_theme input {
color: #d9dce0;
}
.sk_theme .url {
color: #98971a;
}
.sk_theme .annotation {
color: #b16286;
}
.sk_theme .omnibar_highlight {
color: #ebdbb2;
}
.sk_theme #sk_omnibarSearchResult ul li:nth-child(odd) {
background: #282828;
}
.sk_theme #sk_omnibarSearchResult ul li.focused {
background: #d3869b;
}
#sk_status, #sk_find {
font-size: 20pt;
}`;
// click `Save` button to make above settings to take effect.</ctrl-i></ctrl-y>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment