Actually we can modify the omni.ja file to achieve a faster and safer method.
Find "\browser\omni.ja", unzip it with unzip.exe, modify "tabbrowser.js" and compress it with zip.exe.
For example, I open YouTube and my firefox title is.
Subscriptions - YouTube || https://www.youtube.com/feed/subscriptions
I modified two places.
1, removed " - Mozilla Firefox" from the title, if the title is blank, set the title to "null"
Code: Select all
tab_js_str := strReplace(tab_js_str, "let dataSuffix", "if (title)`nreturn title;`nelse`nreturn `"null`";`nlet dataSuffix")
Code: Select all
rs := "
(
updateTitlebar() {
let uri = this.selectedBrowser.documentURI;
if (uri)
document.title = this.getWindowTitleForBrowser(this.selectedBrowser) + " || " + uri.spec;
else
document.title = this.getWindowTitleForBrowser(this.selectedBrowser);
},
)"
tab_js_str := RegExReplace(tab_js_str, "Uim)updateTitlebar\(\)\s+\{[^\}]+\},", rs)