Showing questions tagged: Show all questions

Browser Console

I want to programatically access the open tabs #document object by the Browser Console. I am in chrome://browser/content/browser.xhtml I fallow the docs in browser consol… (read more)

I want to programatically access the open tabs #document object by the Browser Console. I am in chrome://browser/content/browser.xhtml I fallow the docs in browser console: https://firefox-source-docs.mozilla.org/devtools-user/browser_console/index.html

Following the code: var newTabBrowser = gBrowser.getBrowserForTab(gBrowser.selectedTab); newTabBrowser.addEventListener("load", function() {

newTabBrowser.contentDocument.body.innerHTML = "

this page has been eaten

";

}, true); newTabBrowser.contentDocument.location.href = "https://mozilla.org/";

.contentDocument is null except if current tab is a page such as page about:config

Is there a way to allow chrome:// tab to access read only of the tabs #documents property using the console?

I understand that accessing it with javascript from the browser console would be a security issue. I want to bypass it to read, analize and compare dynamic data from the open tabs.

Asked by Javier Munoz 2 months ago

How to edit icon used by Firefox history entry for a specific URL?

I would like to be able to quickly identify certain URLs that appear in my Firefox history by simply looking at corresponding icon — is there a way to edit a Firefox hist… (read more)

I would like to be able to quickly identify certain URLs that appear in my Firefox history by simply looking at corresponding icon — is there a way to edit a Firefox history item to do this?

Asked by David Romano 2 months ago

save a copy of a existing file in the choosen directory

sorry for my bad english. in german I always get in a circle an come never to this page to put in a question. I use version 127.0 and look for in the option to change sav… (read more)

sorry for my bad english. in german I always get in a circle an come never to this page to put in a question. I use version 127.0 and look for in the option to change save file behavior. I already asked google and the comments are from 2022. I like to activate a third button in the save file message box. Currently there are 2 buttons and I want to activate the 3. butten named "save a copy" or like this. I want to choose the directory always self and when I like I want to decide to save a copy with this button and firefox add a copy number automaticaly. I know from google if I do not use the option "always ask where to save file" firefox do so. As background I need this when I use a auto clicker to use a button on a page to download smartmeter data files. Unfortunatly the file have always the same name and not include the date and time. Unfortunatly I am not able to configure firefox automaticaly with the auto clicker or in the crone job file.

Asked by Harald_Schabauer 2 months ago

opening firefox browser

When i open the firefox browser it only opens half screen, i click on the enlarge icon and the page flicks from the left of screen to the right of screen, i have to click… (read more)

When i open the firefox browser it only opens half screen, i click on the enlarge icon and the page flicks from the left of screen to the right of screen, i have to click on the enlarge icon again to get full screen. How do i change the settings so the browser opens in full screen everytime ?

Asked by butchmax 1 month ago

Here's working C# source code to open and arrange 3 Firefox browsers on a 4K monitor wtih Windows

modify to suit your tastes or improve it? working now without any known issues. using System.Diagnostics; using System.Runtime.InteropServices; using System.Text; name… (read more)

modify to suit your tastes or improve it? working now without any known issues.

using System.Diagnostics; using System.Runtime.InteropServices; using System.Text;

namespace FirefoxWindowPositioner {

   class Program {
       [DllImport("user32.dll", SetLastError = true)]
       private static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);
       [DllImport("user32.dll", SetLastError = true)]
       private static extern bool EnumWindows(EnumWindowsProc lpEnumFunc, IntPtr lParam);
       [DllImport("user32.dll", SetLastError = true)]
       private static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId);
       [DllImport("user32.dll")]
       [return: MarshalAs(UnmanagedType.Bool)]
       private static extern bool IsWindowVisible(IntPtr hWnd);
       [DllImport("user32.dll", SetLastError = true)]
       private static extern IntPtr GetWindow(IntPtr hWnd, uint uCmd);
       [DllImport("user32.dll", SetLastError = true)]
       private static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
       [DllImport("user32.dll", SetLastError = true)]
       private static extern int GetClassName(IntPtr hWnd, StringBuilder lpClassName, int nMaxCount);
       private const uint GW_OWNER = 4;
       private const int MaxRetries = 100;
       private const int SleepTime = 200;
       private const string ClassNameToFind = "MozillaWindowClass";
       private delegate bool EnumWindowsProc(IntPtr hWnd, IntPtr lParam);
       private static IntPtr foundWindowHandle = IntPtr.Zero;
       private static bool EnumWindowsCallback(IntPtr hWnd, IntPtr lParam) {
           uint processId;
           GetWindowThreadProcessId(hWnd, out processId);
           if (IsWindowVisible(hWnd) && GetWindow(hWnd, GW_OWNER) == IntPtr.Zero) {
               StringBuilder className = new StringBuilder(256);
               GetClassName(hWnd, className, className.Capacity);
               if (className.ToString() == ClassNameToFind) {
                   foundWindowHandle = hWnd;
                   Console.WriteLine($"Found window handle {hWnd} for process ID {processId}");
                   return false; // Stop enumerating windows once the desired window is found
               }
           }
           return true; // Continue enumerating windows
       }
       static void Main(string[] args) {
           string path = @"C:\Program Files\Mozilla Firefox\firefox.exe";
           // Define positions and sizes
           int[,] positions = new int[,]
           {
               {0, 0, 1284, 2120},
               {1280, 0, 1284, 2120},
               {2560, 0, 1284, 2120}
           };
           int initialDelay = 750; // Initial delay in milliseconds, 1000 worked
           int retryDelay = 200; // Delay between retries in milliseconds
           // Start three Firefox processes sequentially and move them to specified positions
           for (int i = 0; i < 3; i++) {
               Process firefoxProcess = Process.Start(path);
               Thread.Sleep(initialDelay); // Wait for the process to initialize
               foundWindowHandle = IntPtr.Zero;
               int retries = 0;
               while (foundWindowHandle == IntPtr.Zero && retries < MaxRetries) {
                   EnumWindows(EnumWindowsCallback, IntPtr.Zero);
                   if (foundWindowHandle == IntPtr.Zero) {
                       Thread.Sleep(retryDelay); // Wait before retrying
                       retries++;
                   }
               }
               if (foundWindowHandle != IntPtr.Zero) {
                   bool success = MoveWindow(foundWindowHandle, positions[i, 0], positions[i, 1], positions[i, 2], positions[i, 3], true);
                   if (success) {
                       Console.WriteLine($"Moved window {i + 1} to X: {positions[i, 0]}, Y: {positions[i, 1]}, Width: {positions[i, 2]}, Height: {positions[i, 3]}");
                   } else {
                       Console.WriteLine($"Failed to move window {i + 1}");
                   }
               } else {
                   Console.WriteLine($"Failed to get handle for Firefox process {i + 1}");
               }
           }
       }
   }

}

Asked by FireFoxCustomWannabe 2 months ago

Setting text alignment in Firefox PDF viewer

Is there a way to change text alignment for Firefox PDF viewer? When I add text to a PDF file, sometimes it's left aligned and sometimes centered, so I think I might hav… (read more)

Is there a way to change text alignment for Firefox PDF viewer?

When I add text to a PDF file, sometimes it's left aligned and sometimes centered, so I think I might have changed the alignment accidentally.

Asked by prlygates1121 2 months ago

Very strong overexposure on all videos

Hello, I faced such a problem as a very strong contrast on all videos, for example on Youtube. I used firefox 2 years ago and there was no such problem. I tried to reduce… (read more)

Hello, I faced such a problem as a very strong contrast on all videos, for example on Youtube. I used firefox 2 years ago and there was no such problem. I tried to reduce the brightness and contrast in the monitor settings, but alas it did not help. Please help me solve the problem

Asked by Женёк 2 months ago

Exclude words from search default option

Moz Developers, I would like to add a default exclude words from from search results. So for example, my search would be "Best places to live" but I would like to ex… (read more)

Moz Developers,

I would like to add a default exclude words from from search results. So for example, my search would be

"Best places to live" but I would like to exclude Africa with

"Best places to live -africa"

Could "-africa" be added to a default search bar settings so I don't need to type it?

Cheers

Asked by jakeowsley25 2 months ago

Zoomed in page alignement

Hello all, I am looking for a way to lock align a zoomed in site (when horizontal scroll bar is visible) to the right instead of default alignment to the left when I ope… (read more)

Hello all,

I am looking for a way to lock align a zoomed in site (when horizontal scroll bar is visible) to the right instead of default alignment to the left when I open next page.

Asked by alen.jerman 2 months ago

YouTube videos

Hi! I sometimes play 2 YouTube videos each in own browser. In FireFox it pauses the video in the browser not active. Is there a setting to keep both videos playing? … (read more)

Hi! I sometimes play 2 YouTube videos each in own browser. In FireFox it pauses the video in the browser not active. Is there a setting to keep both videos playing?

Asked by Neels Smit 1 month ago

Want to download PDF documents into Google Drive

Using Firefox, I would like to download PDF documents that are online directly to a Google Drive folder. Is that possible with Firefox? Thanks in advance for a response! … (read more)

Using Firefox, I would like to download PDF documents that are online directly to a Google Drive folder. Is that possible with Firefox? Thanks in advance for a response!

Asked by mitch32 2 months ago

Need to hide "Browser is under remote control (Reason: Marionette)"

I am in need to develop Visual Studio Desktop Application for Windows, and open 1 website in InPrivate or incognito mode, that is achieve for Edge and Chrome browser and … (read more)

I am in need to develop Visual Studio Desktop Application for Windows, and open 1 website in InPrivate or incognito mode, that is achieve for Edge and Chrome browser and able to hide "Browser is under remote control", but can't able to figure out parameter or settings to do that for Firefox browser.

I am using Firefox 128.0 (64-bit) and Selenium WebDriver 4.22.0, Selenium.WebDriver.GeckoDriver 0.34.0.

I opened https://github.com/mozilla/geckodriver/issues/2186, and thought that, maybe there is any settings of Mozilla Firefox (about:profile), so ask here also.

Need your expert advice.

Regards,

Kamal Kiri

Asked by Kamal Kiri 2 months ago

More upgrades apache code

Need help some one trying to make look crazy .there using there knowledge for there own evil ways.so please help thanks. … (read more)

Need help some one trying to make look crazy .there using there knowledge for there own evil ways.so please help thanks.

Asked by Douglas 2 months ago

CLOSE TAB in content area context menu.

I have previously been able to include the tab 'Close Tab' item in the #contentAreaContextMenu by adding it to browser.xhtml. This no longer works even though 'Reopen Clo… (read more)

I have previously been able to include the tab 'Close Tab' item in the #contentAreaContextMenu by adding it to browser.xhtml. This no longer works even though 'Reopen Closed Tab' and 'New Tab' still do.

     <menuitem id="toolbar-context-openANewTab"
               command="cmd_newNavigatorTab"
               data-l10n-id="toolbar-context-menu-new-tab"/>
     <menuitem id="context_closeTab"
               label="Close Tab"
               data-lazy-l10n-id="tab-context-close-n-tabs"
               data-l10n-args='{"tabCount": 1}'/>
     <menuitem id="context_undoCloseTab"
               label="Reopen Closed Tab"
               data-l10n-id="tab-context-reopen-closed-tabs"
               data-l10n-args='{"tabCount": 1}'
               observes="History:UndoCloseTab"/>


I was previously using the following which no longer works either.

     <menuitem id="context_closeTab"
               label="Close Tab"
               oncommand="BrowserCloseTabOrWindow(event);"/>

Asked by deanone 2 months ago

Automatically download and save URL to File (like open Website in Firefox and save it there) - Java must work -

Hi I need to download Websites automatically via Batch exaktly like the Browser would save them via Strg+S. I used curl to do that and it worked fine for many years but… (read more)

Hi

I need to download Websites automatically via Batch exaktly like the Browser would save them via Strg+S.

I used curl to do that and it worked fine for many years but now the Source-Website has changed and so curl is no longer able to get the content. The problem is that the URL / Website that the Browser downloads does not contain the information. This is loaded later by a java script.

So when I open the URL in the Browser and look at the Source-Code I can see something like

 <script src="/example.js"></script>


When I press Strg+S to save the website the whole site is saved, because the java script was executed by the Browser. Curl does not process java so it saves only the source code with the "<script src="/example.js"></script>"

Question is: How can I download the URL directly with the Java Script executed so that the informaion is included too ?

I hope anybody can answer that.

Thank you.

Asked by nicommander 2 months ago