mirror of https://github.com/shuang854/Turtle
added an extension checking component
parent
0e6f9d885b
commit
b4f33944a6
@ -0,0 +1,6 @@
|
|||||||
|
var currentVersion = chrome.runtime.getManifest().version;
|
||||||
|
window.addEventListener('message', (e) => {
|
||||||
|
if (e.data.toString() === 'get extension version') {
|
||||||
|
e.ports[0].postMessage({ version: currentVersion });
|
||||||
|
}
|
||||||
|
});
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
@ -0,0 +1,18 @@
|
|||||||
|
.extension-content {
|
||||||
|
--background: var(--ion-color-light-shade);
|
||||||
|
}
|
||||||
|
|
||||||
|
.extension-content * {
|
||||||
|
color: var(--ion-color-primary);
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.firefox-link {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.firefox-ext-img {
|
||||||
|
height: 60px;
|
||||||
|
width: 172px;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
import { IonContent, IonImg, IonListHeader, IonRouterLink } from '@ionic/react';
|
||||||
|
import React from 'react';
|
||||||
|
import firefox from '../../assets/get-firefox-addon.png';
|
||||||
|
import './GetExtension.css';
|
||||||
|
|
||||||
|
const GetExtension: React.FC = () => {
|
||||||
|
return (
|
||||||
|
<IonContent class="extension-content">
|
||||||
|
<IonListHeader>Browser extension installation is required.</IonListHeader>
|
||||||
|
<IonRouterLink
|
||||||
|
href="https://addons.mozilla.org/en-US/firefox/addon/turtletv/"
|
||||||
|
target="_blank"
|
||||||
|
class="firefox-link"
|
||||||
|
>
|
||||||
|
<IonImg src={firefox} alt="Get the extension for Firefox" class="firefox-ext-img"></IonImg>
|
||||||
|
</IonRouterLink>
|
||||||
|
</IonContent>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default GetExtension;
|
||||||
Loading…
Reference in New Issue