mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 06:20:02 -04:00
feat: add reload button to percury unblocker
This commit is contained in:
parent
2512c86496
commit
e04a719140
2 changed files with 15 additions and 9 deletions
|
@ -30,4 +30,8 @@ export class ScramjetFrame extends EventTarget {
|
||||||
forward() {
|
forward() {
|
||||||
this.frame.contentWindow?.history.forward();
|
this.frame.contentWindow?.history.forward();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reload() {
|
||||||
|
this.frame.contentWindow?.location.reload();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
20
static/ui.js
20
static/ui.js
|
@ -86,13 +86,13 @@ function Config() {
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
function handleModalClose(modal) {
|
function handleModalClose(modal) {
|
||||||
modal.style.opacity = 0;
|
modal.style.opacity = 0;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
modal.close();
|
modal.close();
|
||||||
modal.style.opacity = 1;
|
modal.style.opacity = 1;
|
||||||
}, 250)
|
}, 250);
|
||||||
}
|
}
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<dialog class="cfg" style="background-color: #121212; color: white; border-radius: 8px;">
|
<dialog class="cfg" style="background-color: #121212; color: white; border-radius: 8px;">
|
||||||
|
@ -100,8 +100,9 @@ function Config() {
|
||||||
<div class=${[flex, "buttons"]}>
|
<div class=${[flex, "buttons"]}>
|
||||||
<button on:click=${() => connection.setTransport("/baremod/index.mjs", [store.bareurl])}>use bare server 3</button>
|
<button on:click=${() => connection.setTransport("/baremod/index.mjs", [store.bareurl])}>use bare server 3</button>
|
||||||
<button on:click=${() =>
|
<button on:click=${() =>
|
||||||
connection.setTransport("/libcurl/index.mjs", [{wisp: store.wispurl},
|
connection.setTransport("/libcurl/index.mjs", [
|
||||||
])}>use libcurl.js</button>
|
{ wisp: store.wispurl },
|
||||||
|
])}>use libcurl.js</button>
|
||||||
<button on:click=${() => connection.setTransport("/epoxy/index.mjs", [{ wisp: store.wispurl }])}>use epoxy</button>
|
<button on:click=${() => connection.setTransport("/epoxy/index.mjs", [{ wisp: store.wispurl }])}>use epoxy</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -236,6 +237,7 @@ function App() {
|
||||||
<button on:click=${() => cfg.showModal()}>config</button>
|
<button on:click=${() => cfg.showModal()}>config</button>
|
||||||
<button on:click=${() => frame.back()}><-</button>
|
<button on:click=${() => frame.back()}><-</button>
|
||||||
<button on:click=${() => frame.forward()}>-></button>
|
<button on:click=${() => frame.forward()}>-></button>
|
||||||
|
<button on:click=${() => frame.reload()}>↻</button>
|
||||||
|
|
||||||
<input class="bar" bind:value=${use(this.url)} on:input=${(e) => {
|
<input class="bar" bind:value=${use(this.url)} on:input=${(e) => {
|
||||||
this.url = e.target.value;
|
this.url = e.target.value;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue