From 0fcace8986a0cdfebbc824d34ac0559339dd70d3 Mon Sep 17 00:00:00 2001 From: sienori Date: Thu, 7 Feb 2019 03:02:06 +0900 Subject: [PATCH] Add popup font color options --- simple-translate/_locales/en/messages.json | 6 ++++++ simple-translate/options/options.html | 24 ++++++++++++++++++++++ simple-translate/simple-translate.js | 2 ++ 3 files changed, 32 insertions(+) diff --git a/simple-translate/_locales/en/messages.json b/simple-translate/_locales/en/messages.json index 01b8c06..d5a2e3c 100644 --- a/simple-translate/_locales/en/messages.json +++ b/simple-translate/_locales/en/messages.json @@ -150,6 +150,12 @@ "fontSizeLabel": { "message": "Font size" }, + "resultFontColorLabel": { + "message": "Font color of translation result" + }, + "candidateFontColorLabel": { + "message": "Font color of translation candidates" + }, "bgColorLabel": { "message": "Background color" }, diff --git a/simple-translate/options/options.html b/simple-translate/options/options.html index c2a66ba..1633849 100644 --- a/simple-translate/options/options.html +++ b/simple-translate/options/options.html @@ -296,6 +296,30 @@ +
  • +
    +

    翻訳結果のフォントカラー

    +
    +
    + +
    +
  • + +
  • +
    +

    翻訳候補のフォントカラー

    +
    +
    + +
    +
  • +
  • 背景色

    diff --git a/simple-translate/simple-translate.js b/simple-translate/simple-translate.js index 2757a9d..a11634c 100644 --- a/simple-translate/simple-translate.js +++ b/simple-translate/simple-translate.js @@ -182,6 +182,8 @@ function panelPosition(e) { panel.style.maxWidth = S.get().width + "px"; panel.style.maxHeight = S.get().height + "px"; panel.style.fontSize = S.get().fontSize + "px"; + panel.getElementsByClassName("result")[0].style.color = S.get().resultFontColor; + panel.getElementsByClassName("candidate")[0].style.color = S.get().candidateFontColor; panel.style.backgroundColor = S.get().bgColor; }