Skip to content

Instantly share code, notes, and snippets.

@yssource
Last active June 30, 2020 13:27
Show Gist options
  • Save yssource/42ff93cae65f9a992b0884de7ca27210 to your computer and use it in GitHub Desktop.
Save yssource/42ff93cae65f9a992b0884de7ca27210 to your computer and use it in GitHub Desktop.

Revisions

  1. yssource revised this gist Jun 30, 2020. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions .surfingkeys.js
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    // an example to create a new mapping `ctrl-y`
    mapkey("<Ctrl-y>", "Show me the money", function() {
    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)."
    );
    @@ -49,7 +49,8 @@ settings.theme = `
    font-size: 20pt;
    }`;
    // click `Save` button to make above settings to take effect.
    map("spp", ":setProxyMode bypass");
    // map("spp", ":setProxyMode bypass");
    map(";pp", ":setProxyMode bypass");
    map("K", "R");
    map("J", "E");
    map("<Ctrl-ArrowLeft>", "E");
    @@ -64,4 +65,4 @@ settings.smartPageBoundary = false;
    settings.showProxyInStatusBar = true;
    settings.tabsThreshold = 18;
    // setProxy 192.168.1.100:9666
    // setProxy 127.0.0.1:9666 SOCKS5
    // setProxy 127.0.0.1:9666 SOCKS5
  2. yssource created this gist Jun 5, 2020.
    67 changes: 67 additions & 0 deletions .surfingkeys.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,67 @@
    // 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>");

    // set theme
    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;
    }`;
    // click `Save` button to make above settings to take effect.
    map("spp", ":setProxyMode bypass");
    map("K", "R");
    map("J", "E");
    map("<Ctrl-ArrowLeft>", "E");
    map("<Ctrl-ArrowRight>", "R");
    Hints.numericHints = true;
    settings.showTabIndices = true;

    //让所有错误页面都支持surfingkeys
    settings.interceptedErrors = ["*"];
    //设置surfingkeys不自动跳页
    settings.smartPageBoundary = false;
    settings.showProxyInStatusBar = true;
    settings.tabsThreshold = 18;
    // setProxy 192.168.1.100:9666
    // setProxy 127.0.0.1:9666 SOCKS5