Skip to content

Instantly share code, notes, and snippets.

@miukoba
Last active November 21, 2021 15:08
Show Gist options
  • Save miukoba/16947e163d250578bc58326b2493935a to your computer and use it in GitHub Desktop.
Save miukoba/16947e163d250578bc58326b2493935a to your computer and use it in GitHub Desktop.
my mouse-dictionary settings
{
"shortWordLength": 2,
"cutShortWordDescription": 35,
"parseWordsLimit": 8,
"lookupWithCapitalized": false,
"initialPosition": "right",
"scroll": "scroll",
"skipPdfConfirmation": false,
"pdfUrl": "",
"backgroundColor": "#ffffff",
"headFontColor": "#ffffff",
"descFontColor": "#24292e",
"headFontSize": "small",
"descFontSize": "x-small",
"width": 350,
"height": 500,
"replaceRules": [
{
"search": "■",
"replace": "<br>"
},
{
"search": "◆",
"replace": "<br>"
},
{
"search": "(■.+|◆.+)",
"replace": "<span style=\"{{cssReset}};color:#24292E;font-size:100%;\">$1</span>"
},
{
"search": "({.+?}|\\[.+?\\]|\\(.+?\\))",
"replace": "<span style=\"{{cssReset}};font-size:80%;border-radius:0.2em;color:#ffffff;background-color:#aaa;margin:0 3px 0 1px;padding:2px;\">$1</span>"
},
{
"search": "(【.+?】|《.+?》|〈.+?〉|〔.+?〕)",
"replace": "<span style=\"{{cssReset}};color:#cd5659;font-size:100%;\">$1</span>"
},
{
"search": "\\n|\\\\n",
"replace": "<br/>"
},
{
"search": " : ",
"replace": ""
}
],
"normalDialogStyles": "{\n \"opacity\": 0.97,\n \"zIndex\": 2147483647\n}",
"movingDialogStyles": "{\n \"opacity\": 0.8\n}",
"hiddenDialogStyles": "{\n \"opacity\": 0.0,\n \"zIndex\": -1\n}",
"contentWrapperTemplate": "<div style=\"margin:10;padding:0;border:0;vertical-align:baseline;text-align:left;\">\n</div>",
"dialogTemplate": "<div class=\"notranslate\"\n style=\"all:initial;\n {{systemStyles}}\n width: {{width}}px;\n height: {{height}}px;\n position: fixed;\n overflow-x: hidden;\n overflow-y: {{scroll}};\n top: 1px;\n background-color: {{backgroundColor}};\n z-index: 2147483646;\n border-radius: 4px;\n border: 1px solid #A0A0A0;\">\n</div>",
"contentTemplate": "<div style=\"{{cssReset}};font-family:'hiragino kaku gothic pro', meiryo, sans-serif;\">\n {{#words}}\n {{^isShort}}\n <div style=\"{{cssReset}};font-size:{{headFontSize}};color:{{headFontColor}};font-weight:bold;background:#cd5659;color:white;padding:1px 3px;margin-bottom:2px;\">\n {{head}}\n <span style=\"{{cssReset}};\">\n <a href=\"https://www.google.com/search?tbm=isch&amp;q={{head}}\" target=\"_blank\" style=\"text-decoration:none;color:white;font-weight:lighter;padding-left:4px;\">🖼img</a>\n <a href=\"https://www.ei-navi.jp/dictionary/content/{{head}}/\" target=\"_blank\" style=\"text-decoration:none;color:white;font-weight:lighter;padding-left:4px;\">📝dic</a>\n </span>\n </div>\n <div style=\"{{cssReset}};font-size:{{descFontSize}};color:{{descFontColor}};margin-bottom:8px;\">\n {{{desc}}}\n </div>\n {{/isShort}}\n {{#isShort}}\n <div style=\"{{cssReset}};font-size:{{headFontSize}};color:{{headFontColor}};font-weight:bold;background:#cd5659;color:white;padding:1px 3px;margin-bottom:2px;\">\n {{head}}\n <span style=\"{{cssReset}};\">\n <a href=\"https://www.google.com/search?tbm=isch&amp;q={{head}}\" target=\"_blank\" style=\"text-decoration:none;color:white;font-weight:lighter;padding-left:4px;\">🖼img</a>\n <a href=\"https://www.ei-navi.jp/dictionary/content/{{head}}/\" target=\"_blank\" style=\"text-decoration:none;color:white;font-weight:lighter;padding-left:4px;\">📝dic</a>\n </span>\n </div>\n <div style=\"{{cssReset}};color:#505050;font-size:x-small;padding:1px 3px;margin-bottom:8px;\">\n {{shortDesc}}\n </div>\n {{/isShort}}\n {{^isLast}}\n <!--<br/><hr style=\"border:0;border-top:1px dotted #E0E0E0;margin:0;height:1px;width:100%;\" />-->\n {{/isLast}}\n {{/words}}\n</div>"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment