Skip to content

Commit 06080ce

Browse files
authored
Update renderer.js
1 parent 95f0206 commit 06080ce

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

renderer.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
const { ipcRenderer } = require("electron");
22

3-
let currentTab = 0;
4-
53
const tabsContainer = document.getElementById("tabs");
64
const newTabBtn = document.getElementById("new-tab");
75
const urlInput = document.getElementById("url");
@@ -19,7 +17,6 @@ async function addTabButton(index) {
1917
.forEach((t) => t.classList.remove("active"));
2018
btn.classList.add("active");
2119
ipcRenderer.send("switch-tab", index);
22-
currentTab = index;
2320
};
2421

2522
tabsContainer.insertBefore(btn, newTabBtn);
@@ -33,7 +30,6 @@ async function addTabButton(index) {
3330
newTabBtn.onclick = () => {
3431
ipcRenderer.invoke("new-tab").then((index) => {
3532
addTabButton(index);
36-
currentTab = index;
3733
});
3834
};
3935

@@ -50,13 +46,6 @@ window.addEventListener("DOMContentLoaded", () => {
5046
addTabButton(0);
5147
});
5248

53-
ipcRenderer.invoke("get-favicon", index).then((src) => {
54-
const img = document.createElement("img");
55-
img.src = src;
56-
img.className = "favicon";
57-
btn.prepend(img);
58-
});
59-
6049
ipcRenderer.on("update-available", () => {
6150
alert("An update is available and downloading...");
6251
});

0 commit comments

Comments
 (0)