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() {
|
||||
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) {
|
||||
modal.style.opacity = 0;
|
||||
setTimeout(() => {
|
||||
modal.close();
|
||||
modal.style.opacity = 1;
|
||||
}, 250)
|
||||
}
|
||||
function handleModalClose(modal) {
|
||||
modal.style.opacity = 0;
|
||||
setTimeout(() => {
|
||||
modal.close();
|
||||
modal.style.opacity = 1;
|
||||
}, 250);
|
||||
}
|
||||
|
||||
return html`
|
||||
<dialog class="cfg" style="background-color: #121212; color: white; border-radius: 8px;">
|
||||
|
@ -100,8 +100,9 @@ function Config() {
|
|||
<div class=${[flex, "buttons"]}>
|
||||
<button on:click=${() => connection.setTransport("/baremod/index.mjs", [store.bareurl])}>use bare server 3</button>
|
||||
<button on:click=${() =>
|
||||
connection.setTransport("/libcurl/index.mjs", [{wisp: store.wispurl},
|
||||
])}>use libcurl.js</button>
|
||||
connection.setTransport("/libcurl/index.mjs", [
|
||||
{ wisp: store.wispurl },
|
||||
])}>use libcurl.js</button>
|
||||
<button on:click=${() => connection.setTransport("/epoxy/index.mjs", [{ wisp: store.wispurl }])}>use epoxy</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -236,6 +237,7 @@ function App() {
|
|||
<button on:click=${() => cfg.showModal()}>config</button>
|
||||
<button on:click=${() => frame.back()}><-</button>
|
||||
<button on:click=${() => frame.forward()}>-></button>
|
||||
<button on:click=${() => frame.reload()}>↻</button>
|
||||
|
||||
<input class="bar" bind:value=${use(this.url)} on:input=${(e) => {
|
||||
this.url = e.target.value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue