Add chrome extension page link to settings page
This commit is contained in:
parent
f59d9197ba
commit
6633d7df5a
|
@ -274,6 +274,9 @@
|
|||
"addonPageLabel": {
|
||||
"message": "Add-on page"
|
||||
},
|
||||
"extensionPageLabel": {
|
||||
"message": "Extension page"
|
||||
},
|
||||
"amazonUrl": {
|
||||
"message": "https://www.amazon.co.jp/dp/B004N3APGO?language=en_US"
|
||||
},
|
||||
|
|
|
@ -4,3 +4,5 @@ const browserName = browserInfo().name;
|
|||
const suffix = browserName === "Chrome" ? "fc" : "";
|
||||
export const email = `sienori.firefox+st${suffix}@gmail.com`;
|
||||
export const paypalLink = `https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&no_shipping=1&business=sienori.firefox@gmail.com&item_name=Simple Translate for ${browserName} - Donation`;
|
||||
export const chromeExtensionUrl = `https://chrome.google.com/webstore/detail/iaiomicjabeggjcfkbimgmglanimpnae/`;
|
||||
export const firefoxAddonUrl = `https://addons.mozilla.org/firefox/addon/tab-session-manager/`;
|
||||
|
|
|
@ -3,7 +3,7 @@ import browser from "webextension-polyfill";
|
|||
import browserInfo from "browser-info";
|
||||
import queryString from "query-string";
|
||||
import OptionsContainer from "./OptionContainer";
|
||||
import { paypalLink, email } from "src/common/personalUrls";
|
||||
import { paypalLink, email, chromeExtensionUrl, firefoxAddonUrl } from "src/common/personalUrls";
|
||||
import manifest from "src/manifest-chrome.json";
|
||||
|
||||
export default props => {
|
||||
|
@ -69,17 +69,15 @@ export default props => {
|
|||
extraCaption={
|
||||
<div>
|
||||
<p>
|
||||
<a
|
||||
href={
|
||||
browser.i18n.getMessage("addonUrl")
|
||||
/*browserInfo().name === "Firefox"
|
||||
? browser.i18n.getMessage("addonUrl")
|
||||
: "https://chrome.google.com/webstore/detail/simple-translate/xxxxx" //TODO: Chrome link*/
|
||||
}
|
||||
target="_blank"
|
||||
>
|
||||
{browserInfo().name === "Chrome" ? (
|
||||
<a href={chromeExtensionUrl} target="_blank">
|
||||
{browser.i18n.getMessage("extensionPageLabel")}
|
||||
</a>
|
||||
) : (
|
||||
<a href={firefoxAddonUrl} target="_blank">
|
||||
{browser.i18n.getMessage("addonPageLabel")}
|
||||
</a>
|
||||
)}
|
||||
<span> </span>
|
||||
<a href="https://github.com/sienori/simple-translate" target="_blank">
|
||||
GitHub
|
||||
|
|
Loading…
Reference in a new issue