搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

I Created the Perfect Firefox Look, but I Can’t Use It cuz of userChrome.js

  • 無回覆
  • 0 有這個問題
  • 17 次檢視
more options

I spent a ton of time perfecting my Firefox, making it look exactly how I wanted… but there’s one huge problem. My entire setup relies on userChrome.js, and I haven’t found a way to make it run permanently without pain.

I’m completely out of energy trying to fix this. But maybe someone here knows a proper workaround?

No js loaders and other hacks worked, so I’m sharing the full code. Maybe you can help me figure out a way to keep it running consistently?

Here’s my code:

function fixTabOrientation() {

   let tabbrowserTabs = document.getElementById("tabbrowser-tabs");
   let arrowscrollbox = document.getElementById("tabbrowser-arrowscrollbox");
   let newTabButton = document.getElementById("tabs-newtab-button");
   let peripheryBox = document.getElementById("tabbrowser-arrowscrollbox-periphery");
   let navBar = document.getElementById("nav-bar-customization-target"); 
   let urlBar = document.getElementById("urlbar-container"); // Адресний рядок


   if (tabbrowserTabs?.getAttribute("orient") !== "horizontal") {
       tabbrowserTabs.setAttribute("orient", "horizontal");
   }
   if (arrowscrollbox?.getAttribute("orient") !== "horizontal") {
       arrowscrollbox.setAttribute("orient", "horizontal");
   }


   if (navBar && urlBar && !urlBar.nextSibling?.isSameNode(tabbrowserTabs)) {
       navBar.insertBefore(tabbrowserTabs, urlBar.nextSibling);
   }


   if (newTabButton) {
       newTabButton.style.position = "absolute";
       newTabButton.style.right = "10px"; 
       newTabButton.style.top = "50%"; 
       newTabButton.style.transform = "translateY(-50%)"; 


       if (peripheryBox && !peripheryBox.contains(newTabButton)) {
           peripheryBox.appendChild(newTabButton);
       }
       newTabButton.style.display = "block";  
       newTabButton.style.width = "32px";
       newTabButton.style.height = "32px";
   } else {
       console.log("New Tab");
   }

}

fixTabOrientation(); setInterval(fixTabOrientation, 1000);


Any work solutions would be massively appreciated—I’m honestly exhausted fighting this.

I spent a ton of time perfecting my Firefox, making it look exactly how I wanted… but there’s one huge problem. My entire setup relies on userChrome.js, and I haven’t found a way to make it run permanently without pain. I’m completely out of energy trying to fix this. But maybe someone here knows a proper workaround? No js loaders and other hacks worked, so I’m sharing the full code. Maybe you can help me figure out a way to keep it running consistently? Here’s my code: function fixTabOrientation() { let tabbrowserTabs = document.getElementById("tabbrowser-tabs"); let arrowscrollbox = document.getElementById("tabbrowser-arrowscrollbox"); let newTabButton = document.getElementById("tabs-newtab-button"); let peripheryBox = document.getElementById("tabbrowser-arrowscrollbox-periphery"); let navBar = document.getElementById("nav-bar-customization-target"); let urlBar = document.getElementById("urlbar-container"); // Адресний рядок if (tabbrowserTabs?.getAttribute("orient") !== "horizontal") { tabbrowserTabs.setAttribute("orient", "horizontal"); } if (arrowscrollbox?.getAttribute("orient") !== "horizontal") { arrowscrollbox.setAttribute("orient", "horizontal"); } if (navBar && urlBar && !urlBar.nextSibling?.isSameNode(tabbrowserTabs)) { navBar.insertBefore(tabbrowserTabs, urlBar.nextSibling); } if (newTabButton) { newTabButton.style.position = "absolute"; newTabButton.style.right = "10px"; newTabButton.style.top = "50%"; newTabButton.style.transform = "translateY(-50%)"; if (peripheryBox && !peripheryBox.contains(newTabButton)) { peripheryBox.appendChild(newTabButton); } newTabButton.style.display = "block"; newTabButton.style.width = "32px"; newTabButton.style.height = "32px"; } else { console.log("New Tab"); } } fixTabOrientation(); setInterval(fixTabOrientation, 1000); Any work solutions would be massively appreciated—I’m honestly exhausted fighting this.

如果您還沒有帳號,您必須先登入帳號 來回覆文章。還沒有帳號的話,只能發問新問題