Skip to content
This repository was archived by the owner on Feb 5, 2026. It is now read-only.

Commit 0d8cfa6

Browse files
authored
Added Electron API
1 parent b210816 commit 0d8cfa6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/renderer/script.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,10 @@ window.electronAPI.onTabsUpdated((tabs) => {
2727
el.onclick = () => window.electronAPI.switchTab(i);
2828
tabBar.appendChild(el);
2929
});
30-
});
30+
});
31+
32+
const { ipcRenderer } = require('electron');
33+
34+
ipcRenderer.on('open-source-view', () => {
35+
window.location.href = 'view-source.html';
36+
});

0 commit comments

Comments
 (0)