-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Page Title in Address Bar #428
Comments
It might be possible with JavaScript, but not with CSS. |
Hi @Aris-t2, great to see you here 👍 ! I'd say I testify to that since all my attempts with CSS led to - nothing. And I'm not a pro in JS as you are. But I know a little bit of JS. If you have code snippets for me to try out, I'd be all in for that :) |
I came up with something, that goes into the direction you requested. https://github.com/Aris-t2/CustomJSforFx/blob/master/scripts/tab_label_in_urlbar.uc.js Continue here: https://github.com/Aris-t2/CustomJSforFx/issues |
Great, thank you @Aris-t2, will try 👍 For Waterfox Current (based on FF 91.4.0), is there one of the methods (M2 or M3) you would recommend over the other? |
I can only recommend M2. M3 might work, but I haven't tested it for a while. |
@Aris-t2 I'm sorry, but I can't manage to get this working at all, neither in Windows (Firefox) nor macOS (Firefox, Waterfox), all latest release-channel versions of both browsers. I tried in new empty profiles to make sure there is no interference, and after trying M2 also tried M3 (with its corresponding config.js and config-prefs.js) with all steps from your ReadMe incl. deleting startup cache etc.- same thing. Have you tested this only in dev/ nightly Ffox? Or are you maybe also using specific CSS which is required for this to work? I this also works for you in release Ffox: could you maybe just zip up (with max. compression) and attach your entire chrome folder while you have this working? That might be the easiest/ simplest, esp. for you. I'm sure I can narrow this down from there. |
I run tests on release and Nightly using M2. |
yes @Aris-t2, thanks to your chrome folder I got this working now 👍 Turns out it was a quite blunt mistake: I downloaded https://github.com/Aris-t2/CustomJSforFx/blob/master/scripts/tab_label_in_urlbar.uc.js directly via right click, save as, having forgotten that on GithUb it's necessary to open such link first because it will display the file as a webpage embedded into GithUb, click onto "Raw", THEN download .. :) So for completion, here's the link to the directly downloadable raw script. I even managed to maintain xiaoxiaoflood's config.js mods to also have his custom legacy Extensions still working, by merging his config.js into yours 😎: click to expand// This is a mixed config.js, Aris-t2 and xiaoxiaoflood merged by Lee Binder
lockPref('xpinstall.signatures.required', false);
const Cu = Components.utils;
Object = Cu.getGlobalForObject(Cu).Object;
const { freeze } = Object;
Object.freeze = obj => {
if (Components.stack.caller.filename != 'resource://gre/modules/AppConstants.jsm')
return freeze(obj);
obj.MOZ_REQUIRE_SIGNING = false;
Object.freeze = freeze;
return freeze(obj);
}
try {
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/osfile.jsm");
if (!Services.appinfo.inSafeMode) {
Services.scriptloader.loadSubScript(
OS.Path.toFileURI(OS.Path.join(OS.Constants.Path.profileDir,
"./chrome/userChrome/userChromeJS.js")), this, "UTF-8");
};
} catch(e) {};
try {
const { Services } = Cu.import('resource://gre/modules/Services.jsm');
Cu.import(Services.io.newFileURI(Services.dirsvc.get('ProfD', Ci.nsIFile)).spec + 'chrome/utils/boot.jsm');
} catch (ex) {}; Just one little caveat: if the page/ tab title is really long (which on quite a few pages it is), it completely covers the URL, making it impossible to edit or copy it.. Do you think it would be possible by any chance to insert a condition that onclick (best both, left and right), the label is hidden, or its visibility index is set to a value behind the URL? |
CSS could save the day. ;-) #urlbar:hover #tab_label_in_urlbar {
display: none !important;
} Maybe I should add some "max width" by default or something similar. |
Mighty fine, perfect 👌 ! Or should I say: stylish .. 😉 |
I did some more tweaks to the script. ;-) |
Hi Aris-t2. I've read your issue blurb so I don't expect you to do anything to begin with. At this point I'd just like to hear your expert opinion if you consider it possible at all to revive legacy Firefox' tweak to show a page's title in Firefox' Address Bar rather than the URL?
The two old XUL extensions that did this in Firefox legacy are attached just for reference (simply remove the .zip from each file name)
add_page_title_to_url_bar-1.0.20-fx.xpi.zip
page_title_in_url_bar-6.2-fx.xpi.zip
Also there used to be a similar userChrome.css + url-title-hover.xml solution, but that stopped working, too, with some recent FFx update.
What do you think? Or have you maybe even looked into this at some point already?
The text was updated successfully, but these errors were encountered: