Replies: 15 comments 1 reply
-
Hmm, I am interested in having the label right beside the Panel UI button that I have moved to top left (with Custom CSS for Fx) and much free space right of it. I used to have the tab label there in the past, but it stooped working after some Firefox code changes. Since there is no |
Beta Was this translation helpful? Give feedback.
-
You will have to run some tests, but in general it is possible to move that title item anywhere. Replace with
and add this to your userChrome.css/my_userChrome.css: #tab_label_in_urlbar {
position: absolute !important;
display: flex !important;
padding-inline-start: 95px !important;
margin-bottom: -18px !important;
} I also enabled |
Beta Was this translation helpful? Give feedback.
-
Mighty cool. I somewhat know CSS and JS a bit myself, so I can say: impressive 🥇 ! For my style in WaterFox macOS, I'm using |
Beta Was this translation helpful? Give feedback.
-
Ha, using Interestingly, applying this to the first version of the script does work here without any CSS. But, there is an annoying and strange new issue with both versions: The window control buttons are not visible anymore, but do still work (the mouse over shows it, and I also tested with minimize and maximize), only the box behind them is moved to the bottom partly hiding some buttons, cf. image: Left is the Firefox window, right is an explorer window showing, how the controls should look. Apparently, I am still on Windows 7. I hope this is not important, but:
I use |
Beta Was this translation helpful? Give feedback.
-
I made a slight modification in the code to make the title line up better with the URL: It was this: #tab_label_in_urlbar { I changed it to this: #tab_label_in_urlbar { |
Beta Was this translation helpful? Give feedback.
-
@Speravir On Win7 (AeroGlass) caption buttons are hard coded and adding another item to titlebar vertical box causes the caption buttons to shift. Therefor the themes area for them shifts too. But Win7 buttons stay where the belong and the result can be seen on your screenshot. We have to solve this using position absolute. In my tests (currently on Win 10) caption buttons do not shift. Try this code: // 'Tab label in titlebar' script for Firefox by Aris
(function() {
try {
var titlebarlabelbox = document.createXULElement("hbox");
titlebarlabelbox.setAttribute("id","tab_label_in_titlebar_box");
var titlebarlabel = document.createXULElement("label");
titlebarlabel.setAttribute("id","tab_label_in_titlebar");
titlebarlabelbox.appendChild(titlebarlabel);
document.getElementById("titlebar").insertBefore(titlebarlabelbox, document.getElementById("titlebar").firstChild);
updateLabel();
// catch cases where tab title can change
document.addEventListener("TabAttrModified", updateLabel, false);
document.addEventListener('TabSelect', updateLabel, false);
document.addEventListener('TabOpen', updateLabel, false);
document.addEventListener('TabClose', updateLabel, false);
document.addEventListener('load', updateLabel, false);
document.addEventListener("DOMContentLoaded", updateLabel, false);
function updateLabel() {
titlebarlabel.setAttribute("value",gBrowser.selectedBrowser.contentTitle);
}
var {Services} = Components.utils.import("resource://gre/modules/Services.jsm", {});
var sss = Components.classes["@mozilla.org/content/style-sheet-service;1"].getService(Components.interfaces.nsIStyleSheetService);
var uri = Services.io.newURI("data:text/css;charset=utf-8," + encodeURIComponent('\
\
#tab_label_in_titlebar_box { \
position: absolute !important; \
display: flex !important; \
padding-inline-start: 95px !important; \
}\
\
'), null, null);
sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
} catch(e) {}
}()); (works with CustomCSSforFx options @glennpc |
Beta Was this translation helpful? Give feedback.
-
@Aris-t2 Here is what I am seeing. |
Beta Was this translation helpful? Give feedback.
-
I see this on your screenshot. |
Beta Was this translation helpful? Give feedback.
-
@Aris-t2 |
Beta Was this translation helpful? Give feedback.
-
And now that you speak of it I suddenly remember that I once had asked you already something in regards to these buttons (blushing 😊). Should be somewhere in the closed threads of CustomCSSforFx.
Works great! Thank you. I assume there are too much preconditions for styling to add it as regular script, right? (At least I saved the url and will certainly notice updates on the titlebar_in_urlbar script).
And with appbutton_in_titlebar styles, as well, which is why you supposedly have added the start-padding. |
Beta Was this translation helpful? Give feedback.
-
Here is the script version for the titlebar: #55 |
Beta Was this translation helpful? Give feedback.
-
👍 👍 I am blushing even more, especially for your idea with var settings. |
Beta Was this translation helpful? Give feedback.
-
There is this tab_title_url.uc.js script (by sdavidg) that displays a tooltip on the address bar. |
Beta Was this translation helpful? Give feedback.
-
Also there is Merci-chao's Page Title in URL Bar (thanks to xiaoxiaoflood for the hint). |
Beta Was this translation helpful? Give feedback.
-
@Aris-t2 updated his script on 2022-12-13: https://github.com/Aris-t2/CustomJSforFx/blob/master/scripts/tab_label_in_urlbar.uc.js Changes see commit #180f4c20e3a692d38fba1291e9d1818bb1e277f6
|
Beta Was this translation helpful? Give feedback.
-
I received a few requests about adding tab title to location bar in the past.
Instead of replacing the url, the script adds the tab title into 'page action buttons' box.
https://github.com/Aris-t2/CustomJSforFx/blob/master/scripts/tab_label_in_urlbar.uc.js
2021-12-21 update
Beta Was this translation helpful? Give feedback.
All reactions