Skip to content
This repository has been archived by the owner on Jan 20, 2025. It is now read-only.

Commit

Permalink
Fixing Foward & back
Browse files Browse the repository at this point in the history
  • Loading branch information
bearcattt authored Nov 7, 2024
1 parent 38f0d12 commit bbf3211
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/utils/go.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ let clear = document.getElementById("clear") as HTMLButtonElement;
let favicon = document.getElementById("favicon") as HTMLImageElement;
let title = document.getElementById("name") as HTMLTitleElement;
let copy = document.getElementById("copy") as HTMLButtonElement;
let forward = document.getElementById("forward") as HTMLButtonElement;
let back = document.getElementById("back") as HTMLButtonElement;
let f = document.getElementById("forward") as HTMLButtonElement;
let b = document.getElementById("back") as HTMLButtonElement;


async function frame() {
Expand Down Expand Up @@ -115,8 +115,8 @@ if (copy) {
});
}

if (forward) {
forward.addEventListener("click", () => {
if (f) {
f.addEventListener("click", () => {
if (iframe) {
iframe.contentWindow?.history.forward();
} else {
Expand All @@ -125,8 +125,8 @@ if (forward) {
});
}

if (back) {
back.addEventListener("click", () => {
if (b) {
b.addEventListener("click", () => {
if (iframe) {
iframe.contentWindow?.history.back();
} else {
Expand Down

0 comments on commit bbf3211

Please sign in to comment.