I would like to be able to perform the following actions from outside the browser, for example from a script

‘’’ Obtain a list of all tabs, and which URL is open Obtain a list of all firefox windows and which tab is in each and in what order Obtain a list of firefox running instances Actions on tabs Close a tab Open a new tab and enter URL move a tab in a window’s tab order move a tab to another window mute/unmute a tab make a tab hidden or unhide pin/unpin a tab select/unselect a tab discard a tab reload a tab copy tab body or a specific xpath run a javascript cmdlet, (bookmarklet ? ) Run a function of a script in somethingmonkey bookmarks list all bookmarks folder and bookmarks move a bookmark to another folder delete a bookmark create a bookmark get/change position of a firefox window close a window/ open a new window list installed addons turn an addon on or off ‘’’

I would love to be able to write script, from outside firefox, and do these actions

I have found about the remote debugger, but I can’t figure out if it’s only for debugging firefox on android via adb ? Or can I use that directly from a script ?

https://firefox-source-docs.mozilla.org/devtools-user/about_colon_debugging/index.html#connecting-over-the-network

https://wiki.mozilla.org/Firefox_OS/Remote_Control

https://wiki.mozilla.org/Firefox/CommandLineOptions

devtools.debugger.remote-enabled -start-debugger-server ?

Is any of this possible ?

thanks !

You are viewing a single thread.
View all comments
10 points

Can you please make those into a list?

Yes that is likely possible. Firefox uses SQL databases, json files, and more complex stuff to store all its data.

Reading data is possible but complex. Opening windows is done via CLI interface. Moving the windows is part of your compositor and not Firefox, like KWin on KDE.

permalink
report
reply
5 points
*

It’s

  • Obtain a list of all tabs, and which URL is open
  • Obtain a list of all firefox windows and which tab is in each and in what order
  • Obtain a list of firefox running instances
  • Actions on tabs
  • Close a tab
  • Open a new tab and enter URL
  • move a tab in a window’s tab order
  • move a tab to another window
  • mute/unmute a tab
  • make a tab hidden or unhide
  • pin/unpin a tab
  • select/unselect a tab
  • discard a tab
  • reload a tab
  • copy tab body or a specific xpath
  • run a javascript cmdlet, (bookmarklet ? )
  • Run a function of a script in somethingmonkey
  • bookmarks
  • list all bookmarks folder and bookmarks
  • move a bookmark to another folder
  • delete a bookmark
  • create a bookmark
  • get/change position of a firefox window
  • close a window/open a new window
  • list installed addons
  • turn an addon on or off
permalink
report
parent
reply
2 points

Thanks for your time haha

permalink
report
parent
reply
2 points

Oops it looked fine when I posted. And I won’t be back at my computer for quite a while.

It is a series of basic browser function. Mostly list tabs, read tab url, move tab, close tab.

permalink
report
parent
reply
3 points

It might help to know what exactly you’re trying to do. Are you trying to automate something? Buy stonks? Download porn? Click ads?

There might be better solutions than automating a browser.

permalink
report
parent
reply
0 points

Control basic browser fonction from console and scripts.

Example, move all tab where url contains testpattern1 to new window. Imagine a sinple example like that for all the listed functions.

permalink
report
parent
reply
2 points

It only looked ok in the textarea you wrote it in, but the format was wrong.

You have a few options:

* lists
* with a * or -
  • lists
  • with a * or -

Blank

Lines

For paragraphs

Blank

Lines

For paragraphs


Double spaces  
At end of lines  
If you don't want paragraphs

Double spaces
At end of lines
If you don’t want paragraphs


It looked like you were trying to use code formatting which is three backticks, but you used single quotes. This is a backtick: `

Then
It'll  keep   exactly what you write
l1I|
permalink
report
parent
reply

Firefox

!firefox@lemmy.ml

Create post

A place to discuss the news and latest developments on the open-source browser Firefox

Community stats

  • 1.8K

    Monthly active users

  • 890

    Posts

  • 17K

    Comments

Community moderators