2022-10-27 13:48:34 +00:00
|
|
|
import {html} from 'htm/preact';
|
|
|
|
import {Component, render} from 'preact';
|
|
|
|
|
2022-10-27 19:13:02 +00:00
|
|
|
import storage from '../redirect/storage.js';
|
2022-10-27 13:48:34 +00:00
|
|
|
import {PageFooter} from './components/page-footer.js';
|
|
|
|
import {PageHeader} from './components/page-header.js';
|
|
|
|
import {PageMain} from './components/page-main.js';
|
|
|
|
import {generateExamples} from './examples.js';
|
|
|
|
|
|
|
|
window.addEventListener('DOMContentLoaded', () => {
|
|
|
|
window.Holllo = {
|
|
|
|
async insertExamples() {
|
2022-10-27 19:13:02 +00:00
|
|
|
await storage.savePrepared(await generateExamples());
|
2022-10-27 13:48:34 +00:00
|
|
|
location.reload();
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
render(html`<${OptionsPage} />`, document.body);
|
|
|
|
});
|
|
|
|
|
|
|
|
class OptionsPage extends Component {
|
|
|
|
render() {
|
|
|
|
return html`
|
|
|
|
<${PageHeader} />
|
|
|
|
<${PageMain} />
|
|
|
|
<${PageFooter} />
|
|
|
|
`;
|
|
|
|
}
|
|
|
|
}
|