mirror of
https://github.com/abhijithvijayan/web-extension-starter.git
synced 2026-01-30 09:48:12 +01:00
fix: apply new prettier rules
This commit is contained in:
parent
b258224b46
commit
2d510b8f30
@ -30,7 +30,7 @@
|
|||||||
"webextension-polyfill-ts": "^0.14.0"
|
"webextension-polyfill-ts": "^0.14.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@abhijithvijayan/eslint-config": "0.14.1",
|
"@abhijithvijayan/eslint-config": "^1.3.0",
|
||||||
"@abhijithvijayan/tsconfig": "^1.1.2",
|
"@abhijithvijayan/tsconfig": "^1.1.2",
|
||||||
"@babel/core": "^7.9.0",
|
"@babel/core": "^7.9.0",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.8.3",
|
"@babel/plugin-proposal-class-properties": "^7.8.3",
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { browser } from 'webextension-polyfill-ts';
|
import {browser} from 'webextension-polyfill-ts';
|
||||||
|
|
||||||
browser.runtime.onInstalled.addListener((): void => {
|
browser.runtime.onInstalled.addListener((): void => {
|
||||||
console.log('extension installed');
|
console.log('extension installed');
|
||||||
});
|
});
|
||||||
|
|||||||
@ -3,22 +3,30 @@ import React from 'react';
|
|||||||
import './styles.scss';
|
import './styles.scss';
|
||||||
|
|
||||||
const Options: React.FC = () => {
|
const Options: React.FC = () => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<form>
|
<form>
|
||||||
<p>
|
<p>
|
||||||
<label htmlFor="name">Name</label>
|
<label htmlFor="name">Name</label>
|
||||||
<br />
|
<br />
|
||||||
<input type="text" id="name" name="name" spellCheck="false" autoComplete="off" required />
|
<input
|
||||||
</p>
|
type="text"
|
||||||
<p>
|
id="name"
|
||||||
<label htmlFor="logging">
|
name="name"
|
||||||
<input type="checkbox" name="logging" /> Show the features enabled on each page in the console
|
spellCheck="false"
|
||||||
</label>
|
autoComplete="off"
|
||||||
</p>
|
required
|
||||||
</form>
|
/>
|
||||||
</div>
|
</p>
|
||||||
);
|
<p>
|
||||||
|
<label htmlFor="logging">
|
||||||
|
<input type="checkbox" name="logging" /> Show the features enabled
|
||||||
|
on each page in the console
|
||||||
|
</label>
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Options;
|
export default Options;
|
||||||
|
|||||||
@ -1,51 +1,55 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { browser, Tabs } from 'webextension-polyfill-ts';
|
import {browser, Tabs} from 'webextension-polyfill-ts';
|
||||||
|
|
||||||
import './styles.scss';
|
import './styles.scss';
|
||||||
|
|
||||||
function openWebPage(url: string): Promise<Tabs.Tab> {
|
function openWebPage(url: string): Promise<Tabs.Tab> {
|
||||||
return browser.tabs.create({ url });
|
return browser.tabs.create({url});
|
||||||
}
|
}
|
||||||
|
|
||||||
const Popup: React.FC = () => {
|
const Popup: React.FC = () => {
|
||||||
return (
|
return (
|
||||||
<section id="popup">
|
<section id="popup">
|
||||||
<h2>WEB-EXTENSION-STARTER</h2>
|
<h2>WEB-EXTENSION-STARTER</h2>
|
||||||
|
<button
|
||||||
|
id="options__button"
|
||||||
|
type="button"
|
||||||
|
onClick={(): Promise<Tabs.Tab> => {
|
||||||
|
return openWebPage('options.html');
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Options Page
|
||||||
|
</button>
|
||||||
|
<div className="links__holder">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
<button
|
<button
|
||||||
id="options__button"
|
type="button"
|
||||||
type="button"
|
onClick={(): Promise<Tabs.Tab> => {
|
||||||
onClick={(): Promise<Tabs.Tab> => {
|
return openWebPage(
|
||||||
return openWebPage('options.html');
|
'https://github.com/abhijithvijayan/web-extension-starter'
|
||||||
}}
|
);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
Options Page
|
GitHub
|
||||||
</button>
|
</button>
|
||||||
<div className="links__holder">
|
</li>
|
||||||
<ul>
|
<li>
|
||||||
<li>
|
<button
|
||||||
<button
|
type="button"
|
||||||
type="button"
|
onClick={(): Promise<Tabs.Tab> => {
|
||||||
onClick={(): Promise<Tabs.Tab> => {
|
return openWebPage(
|
||||||
return openWebPage('https://github.com/abhijithvijayan/web-extension-starter');
|
'https://www.buymeacoffee.com/abhijithvijayan'
|
||||||
}}
|
);
|
||||||
>
|
}}
|
||||||
GitHub
|
>
|
||||||
</button>
|
Buy Me A Coffee
|
||||||
</li>
|
</button>
|
||||||
<li>
|
</li>
|
||||||
<button
|
</ul>
|
||||||
type="button"
|
</div>
|
||||||
onClick={(): Promise<Tabs.Tab> => {
|
</section>
|
||||||
return openWebPage('https://www.buymeacoffee.com/abhijithvijayan');
|
);
|
||||||
}}
|
|
||||||
>
|
|
||||||
Buy Me A Coffee
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Popup;
|
export default Popup;
|
||||||
|
|||||||
@ -2,10 +2,10 @@
|
|||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@abhijithvijayan/eslint-config@0.14.1":
|
"@abhijithvijayan/eslint-config@^1.3.0":
|
||||||
version "0.14.1"
|
version "1.3.0"
|
||||||
resolved "https://registry.npmjs.org/@abhijithvijayan/eslint-config/-/eslint-config-0.14.1.tgz#ca6a0e0da188cb9d6be1be44a1e054f76be74c69"
|
resolved "https://registry.yarnpkg.com/@abhijithvijayan/eslint-config/-/eslint-config-1.3.0.tgz#cfe741a97f04725fa931e918014dfabc33aefdb1"
|
||||||
integrity sha512-fx/n434sXdKAyKNxtdy91Wn8uqeyfd4fcIC8I1/xb7JTVlqB4uAdp2xVu5KG5hEFL+liauieT97wXNTTJBLTJg==
|
integrity sha512-b823i+e8Tw9auspey0U+3fVziydJ3d0bxUfd+HJdSuuHV/48EO6erPEy3acusqwSQ9uGB3contePze9Yt/n+eA==
|
||||||
|
|
||||||
"@abhijithvijayan/tsconfig@^1.1.2":
|
"@abhijithvijayan/tsconfig@^1.1.2":
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user