Fix indent and space

This commit is contained in:
sienori 2017-12-23 03:26:33 +09:00
parent 112e2f0ca9
commit c3169839d7
2 changed files with 15 additions and 15 deletions

View file

@ -13,15 +13,15 @@ browser.runtime.onInstalled.addListener(function () {
let S = new settingsObj() let S = new settingsObj()
browser.storage.onChanged.addListener(showMenu); browser.storage.onChanged.addListener(showMenu);
S.init().then(function(){ S.init().then(function () {
showMenu(); showMenu();
}); });
function showMenu(){
if(S.get().ifShowMenu){ function showMenu() {
if (S.get().ifShowMenu) {
menuRemove(); menuRemove();
menuCreate(); menuCreate();
} } else menuRemove();
else menuRemove();
} }
function initialSetting() { function initialSetting() {
@ -32,13 +32,13 @@ function initialSetting() {
case "ko": case "ko":
case "ru": case "ru":
targetLang = browser.i18n.getUILanguage(); targetLang = browser.i18n.getUILanguage();
secondTargetLang="en"; secondTargetLang = "en";
break; break;
default: default:
targetLang = "en"; targetLang = "en";
secondTargetLang="ja"; secondTargetLang = "ja";
break; break;
} }
} }
//メニューを表示 //メニューを表示

View file

@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let S=new settingsObj(); let S = new settingsObj();
//設定を読み出し //設定を読み出し
S.init().then(function(value){ S.init().then(function (value) {
defaultTargetLang = value.targetLang; defaultTargetLang = value.targetLang;
targetLang = value.targetLang; targetLang = value.targetLang;
secondTargetLang = value.secondTargetLang; secondTargetLang = value.secondTargetLang;
ifChangeSecondLang=value.ifChangeSecondLang; ifChangeSecondLang = value.ifChangeSecondLang;
langList.value = targetLang; //リスト初期値をセット langList.value = targetLang; //リスト初期値をセット
langList.addEventListener("change", changeLang); langList.addEventListener("change", changeLang);
document.body.style.fontSize=value.fontSize; document.body.style.fontSize = value.fontSize;
}) })
let target = document.getElementById("target"); let target = document.getElementById("target");
@ -21,7 +21,7 @@ let textarea = document.getElementById("textarea");
langList.innerHTML = browser.i18n.getMessage("langList"); langList.innerHTML = browser.i18n.getMessage("langList");
const initialText = browser.i18n.getMessage("initialTextArea"); const initialText = browser.i18n.getMessage("initialTextArea");
textarea.placeholder= initialText; textarea.placeholder = initialText;
let targetLang; let targetLang;
let secondTargetLang; let secondTargetLang;