Αναζήτηση στην υποστήριξη

Προσοχή στις απάτες! Δεν θα σας ζητήσουμε ποτέ να καλέσετε ή να στείλετε μήνυμα σε κάποιον αριθμό τηλεφώνου ή να μοιραστείτε προσωπικά δεδομένα. Αναφέρετε τυχόν ύποπτη δραστηριότητα μέσω της επιλογής «Αναφορά κατάχρησης».

Μάθετε περισσότερα

Focus newtab page content instead of address bar

  • 1 απάντηση
  • 0 έχουν αυτό το πρόβλημα
  • 10 προβολές
  • Τελευταία απάντηση από Razvan Dedu

more options

Hey! Up until the last update, I used this code to set and focus a custom new tab page instead of its address bar (This should be a default feature, but what can you do...)

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

// Set new tab page try {

 ChromeUtils.importESModule("resource:///modules/AboutNewTab.sys.mjs").AboutNewTab.newTabURL = "file:///home/razv/StartPage/index.html"; 

} catch(e){Cu.reportError(e);} // report errors in the Browser Console

// Auto focus new tab content try {

 ChromeUtils.import("resource:///modules/BrowserWindowTracker.jsm").BrowserWindowTracker;
 const Services = globalThis.Services
 Services.obs.addObserver((event) => {
   window = BrowserWindowTracker.getTopWindow();
   window.gBrowser.selectedBrowser.focus();
 }, "browser-open-newtab-start");

} catch(e) { Cu.reportError(e); } ```

After the last update, focusing the new tab page's content is broken. Can anyone help me?

Hey! Up until the last update, I used this code to set and focus a custom new tab page instead of its address bar (This should be a default feature, but what can you do...) ``` var {classes:Cc,interfaces:Ci,utils:Cu} = Components; // Set new tab page try { ChromeUtils.importESModule("resource:///modules/AboutNewTab.sys.mjs").AboutNewTab.newTabURL = "file:///home/razv/StartPage/index.html"; } catch(e){Cu.reportError(e);} // report errors in the Browser Console // Auto focus new tab content try { ChromeUtils.import("resource:///modules/BrowserWindowTracker.jsm").BrowserWindowTracker; const Services = globalThis.Services Services.obs.addObserver((event) => { window = BrowserWindowTracker.getTopWindow(); window.gBrowser.selectedBrowser.focus(); }, "browser-open-newtab-start"); } catch(e) { Cu.reportError(e); } ``` After the last update, focusing the new tab page's content is broken. Can anyone help me?

Επιλεγμένη λύση

Okay, so i managed to solve this myself. For anyone with this problem, I made a complete guide to setting a custom new tab page and auto focus on Firefox 136: https://github.com/n6v26r/.dotfiles/blob/main/firefox.md

Ανάγνωση απάντησης σε πλαίσιο 👍 0

Όλες οι απαντήσεις (1)

more options

Επιλεγμένη λύση

Okay, so i managed to solve this myself. For anyone with this problem, I made a complete guide to setting a custom new tab page and auto focus on Firefox 136: https://github.com/n6v26r/.dotfiles/blob/main/firefox.md

Χρήσιμο;

Υποβολή ερώτησης

Πρέπει να συνδεθείτε στον λογαριασμό σας για να απαντήσετε σε δημοσιεύσεις. Ξεκινήστε μια νέα ερώτηση εάν δεν διαθέτετε ακόμα λογαριασμό.