mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 06:20:02 -04:00
start bootstrapper
This commit is contained in:
parent
034c8e1c6d
commit
17b440ea37
15 changed files with 166 additions and 131 deletions
12
static/ui.js
12
static/ui.js
|
@ -1,7 +1,13 @@
|
|||
navigator.serviceWorker.register("./sw.js").then((reg) => {
|
||||
reg.update();
|
||||
const bootstrapper = new ScramjetBootstrapper({
|
||||
codecs: "/scram/scramjet.codecs.js",
|
||||
worker: "/scram/scramjet.worker.js",
|
||||
thread: "/scram/scramjet.thread.js",
|
||||
client: "/scram/scramjet.client.js",
|
||||
shared: "/scram/scramjet.shared.js",
|
||||
});
|
||||
|
||||
bootstrapper.registerSw("./sw.js");
|
||||
|
||||
navigator.serviceWorker.ready.then((reg) => {
|
||||
for (let i = 0; i < 20; i++) {
|
||||
const thread = new SharedWorker($scramjet.config.thread, {
|
||||
|
@ -159,7 +165,7 @@ function App() {
|
|||
<button on:click=${() => window.open(this.urlencoded)}>open in fullscreen</button>
|
||||
</div>
|
||||
</div>
|
||||
<input class="bar" bind:value=${use(store.url)} on:input=${(e) => (store.url = e.target.value)} on:keyup=${(e) => e.keyCode == 13 && console.log((this.urlencoded = $scramjet.config.prefix + $scramjet.config.codec.encode(e.target.value)))}></input>
|
||||
<input class="bar" bind:value=${use(store.url)} on:input=${(e) => (store.url = e.target.value)} on:keyup=${(e) => e.keyCode == 13 && console.log((this.urlencoded = $scramjet.config.prefix + $scramjet.codec.encode(e.target.value)))}></input>
|
||||
<iframe src=${use(this.urlencoded)}></iframe>
|
||||
</div>
|
||||
`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue