13 lines
338 B
JavaScript
13 lines
338 B
JavaScript
// ==UserScript==
|
||
// @name Rename Tab – Alt+F2
|
||
// @match *://*/*
|
||
// @run-at document-start
|
||
// ==/UserScript==
|
||
|
||
addEventListener('keydown', e=>{
|
||
if (e.altKey && e.key==='F2') {
|
||
e.preventDefault();
|
||
let t = prompt('New title:', document.title);
|
||
document.title = t?.trim() || document.title;
|
||
}
|
||
}, true); |