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);
if (typeof (browser.contextMenus.onShown) != 'undefined') browser.contextMenus.onShown.addListener(updateMenu);

View file

@ -21,13 +21,13 @@
</li>
<li>
<a href="#settings">
<span class="settingsLabel selected sidebarItem">設定</span>
</a>
<span class="settingsLabel selected sidebarItem">設定</span>
</a>
</li>
<li>
<a href="#information">
<span class="informationLabel sidebarItem">情報</span>
</a>
<span class="informationLabel sidebarItem">情報</span>
</a>
</li>
</ul>
</div>
@ -127,8 +127,8 @@
</div>
<div class=optionForm>
<label>
<input type=checkbox id=ifCheckLang class=saveByChange checked>
<span class=checkbox></span>
<input type=checkbox id=ifCheckLang class=saveByChange checked>
<span class=checkbox></span>
</label>
</div>
</li>
@ -164,8 +164,8 @@
<div class=optionForm>
<div class=selectWrap>
<select id=secondTargetLang class=saveByChange>
<option>日本語</option>
</select>
<option>日本語</option>
</select>
</div>
</div>
</li>
@ -215,8 +215,8 @@
</div>
<div class=optionForm>
<label>
<input id=buttonSize class=saveByChange type=number value=22 min=1 placeholder=22>
</label>
<input id=buttonSize class=saveByChange type=number value=22 min=1 placeholder=22>
</label>
</div>
</li>
@ -227,11 +227,11 @@
<div class=optionForm>
<div class=selectWrap>
<select id=buttonPosition class=saveByChange>
<option class=rightUpLabel value=rightUp>右上</option>
<option class=rightDownLabel value=rightDown selected>右下</option>
<option class=leftUpLabel value=leftUp>左上</option>
<option class=leftDownLabel value=leftDown>左下</option>
</select>
<option class=rightUpLabel value=rightUp>右上</option>
<option class=rightDownLabel value=rightDown selected>右下</option>
<option class=leftUpLabel value=leftUp>左上</option>
<option class=leftDownLabel value=leftDown>左下</option>
</select>
</div>
</div>
</li>
@ -306,8 +306,10 @@
<div class=optionContainer>
<div class=optionText>
<p>Simple Translate</p>
<p class="caption"><a class=pageLink href="https://github.com/sienori/simple-translate/releases" target="_blank">
Version. 1.7.3</a></p>
<p class="caption">
<a class=pageLink href="https://github.com/sienori/simple-translate/releases" target="_blank">
Version. 1.7.3</a>
</p>
</div>
</div>
</li>
@ -326,7 +328,9 @@
<div class=optionContainer>
<div class="optionText">
<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>
</div>
</div>
@ -335,7 +339,10 @@
<li>
<div class=optionContainer>
<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>
</li>
@ -357,11 +364,11 @@
<div class=optionContainer>
<div class="optionText">
<a class="pageLink addonUrl" href="https://addons.mozilla.org/firefox/addon/simple-translate/" target="_blank">
<span class="addonPageLabel pageLink">アドオンページ</span>
</a>
<span class="addonPageLabel pageLink">アドオンページ</span>
</a>
<a class=pageLink href="https://github.com/sienori/simple-translate" target="_blank">
<span class=pageLink>github</span>
</a>
<span class=pageLink>github</span>
</a>
</div>
</div>
</li>
@ -377,4 +384,4 @@
</body>
</html>
</html>

View file

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