Om de ûnderfining foar jo te ferbetterjen is tydlik de funksjonaliteit dan dizze website troch ûnderhâldswurk beheind. Wannear in artikel jo probleem net oplost en jo in fraach stelle wolle, kin ús stipemienskip jo helpe yn @FirefoxSupport op Twitter en /r/firefox op Reddit.

Sykje yn Support

Mij stipescams. Wy sille jo nea freegje in telefoannûmer te beljen, der in sms nei ta te stjoeren of persoanlike gegevens te dielen. Meld fertochte aktiviteit mei de opsje ‘Misbrûk melde’.

Mear ynfo

Dizze konversaasje is argivearre. Stel in nije fraach as jo help nedich hawwe.

custom homepage as new tab page doesnt open automatically

  • 13 antwurd
  • 1 hat dit probleem
  • 4 werjeftes
  • Lêste antwurd fan joe23reptiles

more options

hi guys and girls of mozilla,

ive a little issue with a custom homepage i made which i want to use as my new tab page. im on linux and use firefox 76.0.1 (64bit).

i set up a autoconfig.cfg file with this code:

// var {classes:Cc,interfaces:Ci,utils:Cu} = Components;

  • set new tab page */

try { Cu.import("resource:///modules/AboutNewTab.jsm"); var newTabURL = "/home/joe/.mozilla/firefox/h75u1z1z.default/startpage/index.html"; AboutNewTab.newTabURL = newTabURL; } catch(e){Cu.reportError(e);} // report errors in the Browser Console

i also set up a autoconfig.js file with this code:

// First line should be a comment pref("general.config.filename", "autoconfig.cfg"); pref("general.config.obscure_value", 0); pref("general.config.sandbox_enabled", false);

theyre saved in lib/firefox and lib/firefox/defaults/prefs

i then put firefox to open new tabs with a blank page. now it works like this. when i click open a new tab i get a blank page. but in the urlbar is the file selected. now i only need to press enter and i have my new tab page.

the question now is- how can i force firefox to press enter for me. that it opens the file directly and doesnt need me to press enter.

can u spot any errors in the code i copied from a thread in reddits/r/firefox CSS forum?

or is there a setting i can change which makes it the page opens by itself?

ill add two pics- one when i just opend the new tab and one after i clicked enter

hi guys and girls of mozilla, ive a little issue with a custom homepage i made which i want to use as my new tab page. im on linux and use firefox 76.0.1 (64bit). i set up a autoconfig.cfg file with this code: // var {classes:Cc,interfaces:Ci,utils:Cu} = Components; * set new tab page */ try { Cu.import("resource:///modules/AboutNewTab.jsm"); var newTabURL = "/home/joe/.mozilla/firefox/h75u1z1z.default/startpage/index.html"; AboutNewTab.newTabURL = newTabURL; } catch(e){Cu.reportError(e);} // report errors in the Browser Console i also set up a autoconfig.js file with this code: // First line should be a comment pref("general.config.filename", "autoconfig.cfg"); pref("general.config.obscure_value", 0); pref("general.config.sandbox_enabled", false); theyre saved in lib/firefox and lib/firefox/defaults/prefs i then put firefox to open new tabs with a blank page. now it works like this. when i click open a new tab i get a blank page. but in the urlbar is the file selected. now i only need to press enter and i have my new tab page. the question now is- how can i force firefox to press enter for me. that it opens the file directly and doesnt need me to press enter. can u spot any errors in the code i copied from a thread in reddits/r/firefox CSS forum? or is there a setting i can change which makes it the page opens by itself? ill add two pics- one when i just opend the new tab and one after i clicked enter
Keppele skermôfbyldingen

Alle antwurden (13)

more options

Is there a paste error or forum formatting glitch here: the opening / character for the third line is missing:

i set up a autoconfig.cfg file with this code:

//
var {classes:Cc,interfaces:Ci,utils:Cu} = Components;
* set new tab page */
try {
Cu.import("resource:///modules/AboutNewTab.jsm");
var newTabURL = "/home/joe/.mozilla/firefox/h75u1z1z.default/startpage/index.html";
AboutNewTab.newTabURL = newTabURL;
} catch(e){Cu.reportError(e);} // report errors in the Browser Console
more options

just a forum glitch. its

/* set new tab page */

like it is supposed to be. i recognize ur name. u helped me already threw most of it on the firefox css reddit page. didnt knew ure working for mozialla directly. thats cool. but i assume nothing has changed since yesterday, right?

do u know if its possible to go back to a vanilla firefox in linux? i already tried to disable all extensions and put the settings on default. but nothing changed while doing that. when i delete firefox from the system linux keeps all the files. when i reinstall ive my modded firefox back. so no way to go back to vanilla that way i fear.

ive the feeling the issue lies more in my settings than in this code u posted (which seems to work- at east a part of it).

do u know if theres a saftey rule which prevents sites like this to be opend automatically?

more options

The URI needs to be a file:// link:

var newTabURL = "file:///home/joe/.mozilla/firefox/h75u1z1z.default/startpage/index.html"; 

Did you check the Browser Console because that is where errors with autoconfig are reported ?

----

Bewurke troch cor-el op

more options

thats what i tried first (file:///). whenever i do that i get just a blank page. noteven the adress in the urlbar.


how can i check the browser console?

more options

What if you put the page in a less sensitive location, i.e., not in the profile folder?

joe23reptiles said

i recognize ur name. u helped me already threw most of it on the firefox css reddit page. didnt knew ure working for mozialla directly.

Oh most of us do not work for Mozilla, we are volunteers. Community strong.

do u know if its possible to go back to a vanilla firefox in linux? i already tried to disable all extensions and put the settings on default. but nothing changed while doing that. when i delete firefox from the system linux keeps all the files. when i reinstall ive my modded firefox back. so no way to go back to vanilla that way i fear.

How about:

New Profile Test

This takes about 3 minutes, plus the time to re-setup your userChrome.css. Actually, Firefox should apply Autoconfig in new profiles automatically.

Inside Firefox, type or paste about:profiles in the address bar and press Enter/Return to load it.

Click the "Create a New Profile" button, then click Next. Assign a name like May2020, ignore the option to relocate the profile folder, and click the Finish button.

After creating the profile, scroll down to it and click the Launch profile in new browser button.

Firefox should open a new window that looks like a brand new, uncustomized installation. (Your existing Firefox window(s) should not be affected.) Please ignore any tabs enticing you to connect to a Sync account or to activate extensions found on your system so we can get a clean test.

Does the code work any better in the new profile?

When you are done with the experiment, you can close the extra window without affecting your regular Firefox profile. (May2020 will remain available for future testing.)

Note: if this test changed your default profile, use the Set as Default Profile button for your regular profile to set it back to normal.

Bewurke troch jscher2000 - Support Volunteer op

more options

Can you open this file:// link in a Firefox tab ?

more options

OK, I tested it and it works with and without a file:// prefix.

more options

Are you using Firefox from the repositories or Firefox from the Mozilla server ?

more options

ok. ive found the answer. the issue is the tree style tab extension. the thing is- it cant redirect directly to the new tab page.

i got completely rid of everything and started with a vanilla mozilla. there it worked from the get go. then i added the extension i ran one by one with testing between.

so i found out that with file://... tree style tab wont open anything. just a blank page. with just /home/.mozilla... it worked as described above (showing the link selected in the urlbar).

funny thing is- when i use ctrl+t i can open the new tab just fine.

so the issue is clearly with tree style tab. i assume its the same issue the other new tab to url add ons face. they cant link to local files anymore. dont know why it is this way tho.

so we can close this issue. if u have something to say in mozilla maybe consider it that add ons can again open local files agan. or at least some add ons.

thank you for your help tho. its really cool how fast and helpful u are.

stay healthy

more options

joe23reptiles said

so i found out that with file://... tree style tab wont open anything. just a blank page. with just /home/.mozilla... it worked as described above (showing the link selected in the urlbar). ... funny thing is- when i use ctrl+t i can open the new tab just fine.

Oh, you were using a "+" button created by TST instead of the "real" one on the Tabs bar? That had not occurred to me as a scenario but it makes sense now.

The real "+" button can be moved from the Tabs bar to the main toolbar if you prefer using a button. You can drag it in Customize mode (Customize Firefox controls, buttons and toolbars). If you are using CSS to hide the Tabs bar, you may need to temporarily stop hiding it to make the move.

more options

damn. good idea. didnt thought about that. thx again for everything

more options

Any messages related to this extension in the Browser Console ?

  • "3-bar" menu button or Tools -> Web Developer
more options

no. all good. no errors or warnings regarding the extension. i found a third way though. it already worked with the tips and tricks posted here. however- i stumbled upon github pages. i didnt knew i could basically create my own little website with a github repo. i set up the repo and now my startpage is online. and that works flawlessly even from within the tree style tab extension since its not a link to a local file.