Home button between back and forward; Alt+Home
The on-screen buttons are now back / home / forward. Home (and Alt+Home) loads the site on screen from the address it was set up with under Sites & Page Timing, hidden sites included. A shared buildTabUrl() builds that address for both the first load and the home button. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013wi3ZQveYdjfcrEsyazq32
This commit is contained in:
@@ -115,7 +115,7 @@ ipcRenderer.on('keyboard-button-enabled',(event,enabled)=>{
|
||||
}
|
||||
});
|
||||
|
||||
// On-screen back/forward buttons (top middle, half transparent) - an
|
||||
// On-screen back / home / forward buttons (top middle, half transparent) - an
|
||||
// option for screens with no keyboard or mouse side buttons.
|
||||
let historyButtonsEnabled=false;
|
||||
let historyBar=null;
|
||||
@@ -280,7 +280,7 @@ window.addEventListener('DOMContentLoaded',()=>{
|
||||
historyBar.id='electron-history-bar';
|
||||
historyBar.style.cssText=`
|
||||
position:fixed;top:12px;left:50%;transform:translateX(-50%);
|
||||
display:none;gap:14px;z-index:999999;opacity:${historyOpacity};
|
||||
display:none;gap:18px;z-index:999999;opacity:${historyOpacity};
|
||||
transition:opacity 0.15s;user-select:none;
|
||||
`;
|
||||
const makeButton=(label,direction,path)=>{
|
||||
@@ -302,6 +302,7 @@ window.addEventListener('DOMContentLoaded',()=>{
|
||||
};
|
||||
historyBar.append(
|
||||
makeButton('Back','back','M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z'),
|
||||
makeButton('Home (this site\'s start page)','home','M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'),
|
||||
makeButton('Forward','forward','M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z')
|
||||
);
|
||||
historyBar.addEventListener('mouseenter',()=>{historyBar.style.opacity=String(historyHoverOpacity());});
|
||||
|
||||
Reference in New Issue
Block a user