File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11const { ipcRenderer } = require ( "electron" ) ;
22
3- let currentTab = 0 ;
4-
53const tabsContainer = document . getElementById ( "tabs" ) ;
64const newTabBtn = document . getElementById ( "new-tab" ) ;
75const 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) {
3330newTabBtn . 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-
6049ipcRenderer . on ( "update-available" , ( ) => {
6150 alert ( "An update is available and downloading..." ) ;
6251} ) ;
You can’t perform that action at this time.
0 commit comments