-
-
Notifications
You must be signed in to change notification settings - Fork 258
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
[Solved] Use a file:///*.html page as new tab on Firefox #980
Comments
The biggest problem is Firefox doesn't allow web extensions to open a tab of a I'm not sure what https://github.com/cadeyrn/newtaboverride does. However, if it dynamically replaces the HTML code of its newtab page with your configured HTML code, then there're some JS/CSS permission issues to solve. Although it's possible to solve the permission issues, I think the way to solve them will affect what Here's an idea which is not verified yet:
|
@gdh1995 Thanks for answering.
As you have guessed, the extension saves the provided file in It works fine for CSS (as long as I could indeed create another extension, however:
To integrate such feature to Vimium C, we could imagine a custom It looks to me that such solution have great potential to improve usability without adding much complexity. I'm not familiar with the code base, though, and I would respect your decision if you think this is not good fit for Vimium C. Again, if you'd like me to open a PR just to see, it would be a pleasure to contribute. |
@gdh1995 Thanks for the suggestion. Actually, I'm already using the built-in |
Yes, opening You may run a small static-resource HTTP server using |
That is what I was trying to avoid. It'll work, that's for sure, but the thought of setting up a local server just to personalize Firefox's new tab makes me cringe inwardly... However, I figured out it was possible to use a local HTML page through AutoConfig on Firefox. It's not well documented, and is subject to breakage from version to version, but at least it lets you run JavaScript and even focus on content automatically. For reference, here is the pref("general.config.filename", "firefox.cfg");
pref("general.config.obscure_value", 0);
pref("general.config.sandbox_enabled", false); And here is the //
var Services = globalThis.Services;
var {classes:Cc,interfaces:Ci,utils:Cu} = Components;
try {
Cu.import("resource:///modules/AboutNewTab.jsm");
AboutNewTab.newTabURL = "file:///home/delgan/home.html";
Cu.import("resource:///modules/BrowserWindowTracker.jsm");
const Services = globalThis.Services;
Services.obs.addObserver((event) => {
window = BrowserWindowTracker.getTopWindow();
window.gBrowser.selectedBrowser.focus();
}, "browser-open-newtab-start");
} catch(e) { Cu.reportError(e); } Closing the ticket as resolved, thanks for your time. 👍 |
Hello, there's another way by modifying properties on See fastaddons/GroupSpeedDial#36 (comment), which was referred to in #1021 (comment) .
|
@gdh1995 I can confirm that it works very well! Thank you very much for sharing the tip. To summarize:
It's embarrassingly convoluted, but at least I got the result I wanted, thanks! |
What command or commands
Hi. I use Vimium C a lot and I wanted to thank you for all the work you do!
A recurring problem, though, is the inability to use Vimium on "about:home" and "about:newtab". I know you developed "NewTab Adapter" as a workaround. However, I'd like to know your opinion on the possibility of using a customized .html page.
My goal is to have an aesthetically pleasing page that lets me open a bookmark with just one keypress, like this (example using sadparadiseinhell/null):
As far as I know, it's not possible to do something like this as of today (without running a local server).
How should a feature do
I would like Vimium C to provide an option to override home page and new tab using custom HTML.
As an example, I think this extensions provides a way to use local page: https://github.com/cadeyrn/newtaboverride
Let me know your opinion of this and if you would accept a PR.
Browser and OS
The text was updated successfully, but these errors were encountered: