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 !

  • lemmyreader@lemmy.ml
    link
    fedilink
    English
    arrow-up
    13
    arrow-down
    1
    ·
    8 months ago

    Your question reminded me of TabFS https://omar.website/tabfs

    Examples of stuff you can do!

    • List the titles of all the tabs you have open
    • Cull tabs like any other files
    • Close all Stack Overflow tabs
    • Save text of all tabs to a file
    • Evaluate JavaScript on a page / watch expressions: demo
    • Get images / scripts / other resource files from page
    • Retrieve what’s playing on YouTube Music: youtube-music-tabfs
    • Reload an extension when you edit its source code
    • TODO: Live edit a running Web page
    • TODO: Import data (JSON? XLS? JS?)
    • sugar_in_your_tea@sh.itjust.works
      link
      fedilink
      arrow-up
      3
      ·
      8 months ago

      Wow, I never knew I needed this. :)

      There’s a bunch of stuff I have wanted to do, but it’s been too annoying:

      • copy URLs from a list of tabs - e.g. to send to a friend/coworker
      • close tabs with a common theme - Github, Confluence, Jira, etc
      • search across open tabs

      I’m going to play with this today.