Fix indent and space

This commit is contained in:
sienori 2018-06-03 01:31:24 +09:00
parent ca42321057
commit 47d589a515
3 changed files with 36 additions and 28 deletions

View file

@ -11,7 +11,8 @@ browser.runtime.onInstalled.addListener(function () {
}); });
}); });
let S = new settingsObj() let S = new settingsObj();
browser.storage.onChanged.addListener(showMenu); browser.storage.onChanged.addListener(showMenu);
if (typeof (browser.contextMenus.onShown) != 'undefined') browser.contextMenus.onShown.addListener(updateMenu); if (typeof (browser.contextMenus.onShown) != 'undefined') browser.contextMenus.onShown.addListener(updateMenu);

View file

@ -21,13 +21,13 @@
</li> </li>
<li> <li>
<a href="#settings"> <a href="#settings">
<span class="settingsLabel selected sidebarItem">設定</span> <span class="settingsLabel selected sidebarItem">設定</span>
</a> </a>
</li> </li>
<li> <li>
<a href="#information"> <a href="#information">
<span class="informationLabel sidebarItem">情報</span> <span class="informationLabel sidebarItem">情報</span>
</a> </a>
</li> </li>
</ul> </ul>
</div> </div>
@ -127,8 +127,8 @@
</div> </div>
<div class=optionForm> <div class=optionForm>
<label> <label>
<input type=checkbox id=ifCheckLang class=saveByChange checked> <input type=checkbox id=ifCheckLang class=saveByChange checked>
<span class=checkbox></span> <span class=checkbox></span>
</label> </label>
</div> </div>
</li> </li>
@ -164,8 +164,8 @@
<div class=optionForm> <div class=optionForm>
<div class=selectWrap> <div class=selectWrap>
<select id=secondTargetLang class=saveByChange> <select id=secondTargetLang class=saveByChange>
<option>日本語</option> <option>日本語</option>
</select> </select>
</div> </div>
</div> </div>
</li> </li>
@ -215,8 +215,8 @@
</div> </div>
<div class=optionForm> <div class=optionForm>
<label> <label>
<input id=buttonSize class=saveByChange type=number value=22 min=1 placeholder=22> <input id=buttonSize class=saveByChange type=number value=22 min=1 placeholder=22>
</label> </label>
</div> </div>
</li> </li>
@ -227,11 +227,11 @@
<div class=optionForm> <div class=optionForm>
<div class=selectWrap> <div class=selectWrap>
<select id=buttonPosition class=saveByChange> <select id=buttonPosition class=saveByChange>
<option class=rightUpLabel value=rightUp>右上</option> <option class=rightUpLabel value=rightUp>右上</option>
<option class=rightDownLabel value=rightDown selected>右下</option> <option class=rightDownLabel value=rightDown selected>右下</option>
<option class=leftUpLabel value=leftUp>左上</option> <option class=leftUpLabel value=leftUp>左上</option>
<option class=leftDownLabel value=leftDown>左下</option> <option class=leftDownLabel value=leftDown>左下</option>
</select> </select>
</div> </div>
</div> </div>
</li> </li>
@ -306,8 +306,10 @@
<div class=optionContainer> <div class=optionContainer>
<div class=optionText> <div class=optionText>
<p>Simple Translate</p> <p>Simple Translate</p>
<p class="caption"><a class=pageLink href="https://github.com/sienori/simple-translate/releases" target="_blank"> <p class="caption">
Version. 1.7.3</a></p> <a class=pageLink href="https://github.com/sienori/simple-translate/releases" target="_blank">
Version. 1.7.3</a>
</p>
</div> </div>
</div> </div>
</li> </li>
@ -326,7 +328,9 @@
<div class=optionContainer> <div class=optionContainer>
<div class="optionText"> <div class="optionText">
<p class=donationLabel>ご寄付のお願い</p> <p class=donationLabel>ご寄付のお願い</p>
<p class="caption donationCaptionLabel">Simple Translateをご利用いただきありがとうございます。<br>アドオンの開発を続けていく上で,皆様のご支援が大きな励みになります。<br>もしあなたがSimple Translateを気に入ってくれたならご寄付をご検討いただけると幸いです。 <p class="caption donationCaptionLabel">Simple Translateをご利用いただきありがとうございます。
<br>アドオンの開発を続けていく上で,皆様のご支援が大きな励みになります。
<br>もしあなたがSimple Translateを気に入ってくれたならご寄付をご検討いただけると幸いです。
</p> </p>
</div> </div>
</div> </div>
@ -335,7 +339,10 @@
<li> <li>
<div class=optionContainer> <div class=optionContainer>
<div class=optionText> <div class=optionText>
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&no_shipping=1&business=sienori.firefox@gmail.com&item_name=SimpleTranslate - Donation" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" alt="Donate"></a> <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&no_shipping=1&business=sienori.firefox@gmail.com&item_name=SimpleTranslate - Donation"
target="_blank">
<img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" alt="Donate">
</a>
</div> </div>
</div> </div>
</li> </li>
@ -357,11 +364,11 @@
<div class=optionContainer> <div class=optionContainer>
<div class="optionText"> <div class="optionText">
<a class="pageLink addonUrl" href="https://addons.mozilla.org/firefox/addon/simple-translate/" target="_blank"> <a class="pageLink addonUrl" href="https://addons.mozilla.org/firefox/addon/simple-translate/" target="_blank">
<span class="addonPageLabel pageLink">アドオンページ</span> <span class="addonPageLabel pageLink">アドオンページ</span>
</a> </a>
<a class=pageLink href="https://github.com/sienori/simple-translate" target="_blank"> <a class=pageLink href="https://github.com/sienori/simple-translate" target="_blank">
<span class=pageLink>github</span> <span class=pageLink>github</span>
</a> </a>
</div> </div>
</div> </div>
</li> </li>

View file

@ -38,12 +38,12 @@ async function Select(e) {
clickPosition = e; clickPosition = e;
switch (S.get().whenSelectText) { switch (S.get().whenSelectText) {
case 'showButton': case 'showButton':
if(selectionWord.length==0) return; if (selectionWord.length == 0) return;
popupButton(e); popupButton(e);
break; break;
case 'showPanel': case 'showPanel':
translate(selectionWord, 'auto', S.get().targetLang); translate(selectionWord, 'auto', S.get().targetLang);
if(selectionWord.length==0) return; if (selectionWord.length == 0) return;
showPanel(e); showPanel(e);
break; break;
case 'dontShowButton': case 'dontShowButton':
@ -110,7 +110,7 @@ function showResult(resultText, candidateText) {
//パネル表示 //パネル表示
function showPanel(e) { function showPanel(e) {
clickPosition=e; clickPosition = e;
panel.style.display = 'block'; panel.style.display = 'block';
panelPosition(e); panelPosition(e);
} }