Results 1 to 9 of 9

Thread: it would be nice to have a feature in firefox ...

  1. #1
    Join Date
    Jan 2010
    Location
    Wheeling WV USA
    Beans
    1,791
    Distro
    Xubuntu 18.04 Bionic Beaver

    it would be nice to have a feature in firefox ...

    it would be nice to have a feature in firefox that allows a local user script (e.g. an API) to carry out navigation (click on stuff, type in stuff, drag things around, scroll and pan), access and save stuff (HTML, style sheet, javascript, DOM), and view (pixels of entire screen) on the current page. this would allow the script to work on a logged in page on sites with non-standard logins which can't be delivered with ordinary HTTPS libraries or require manual navigation to reach.

    of course such a feature would have to be done with security in mind to prevent bad actors from navigating by bank account or spending my bitcoin.
    Mask wearer, Social distancer, System Administrator, Programmer, Linux advocate, Command Line user, Ham radio operator (KA9WGN/8, tech), Photographer (hobby), occasional tweeter

  2. #2
    Join Date
    Jun 2016
    Beans
    2,062
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: it would be nice to have a feature in firefox ...

    Can't Firefox extensions already do almost all of this?

    If you want to write such extension yourself, to use it you'll need either Firefox Developer Edition or this Firefox build.

  3. #3
    Join Date
    Jan 2010
    Location
    Wheeling WV USA
    Beans
    1,791
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: it would be nice to have a feature in firefox ...

    what language are extensions written in? if Java or C++ or Perl then it won't be happening. what i think all programs on the scale that users want to "script them", they should accept a secured Unix socket connection at any time and do everything over that. requiring the script to be inside the process or start with the process is too limited. it needs to be a well defined inter-process API. then any language that can do networking can be used.

    securing it might include starting it with an environment variable or other configuration telling it which ports to accept or keys to use.
    Mask wearer, Social distancer, System Administrator, Programmer, Linux advocate, Command Line user, Ham radio operator (KA9WGN/8, tech), Photographer (hobby), occasional tweeter

  4. #4
    Join Date
    Jun 2009
    Location
    0:0:0:0:0:0:0:1
    Beans
    5,005
    Distro
    Xubuntu

    Re: it would be nice to have a feature in firefox ...

    Laptop: ASUS A54C-NB91 (Storage: WD3200BEKT + MKNSSDCR60GB-DX); Desktop: Custom Build - Images included; rPi Server
    Putting your Networked Printer's scanner software to shame PHP Scanner Server
    I frequently edit my post when I have the last post

  5. #5
    Join Date
    Jun 2016
    Beans
    2,062
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: it would be nice to have a feature in firefox ...

    Quote Originally Posted by Skaperen View Post
    what language are extensions written in?
    Usually Javascript and JSON for the code, HTML/CSS for the UI. See documentation.

  6. #6
    Join Date
    Jan 2010
    Location
    Wheeling WV USA
    Beans
    1,791
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: it would be nice to have a feature in firefox ...

    Quote Originally Posted by pqwoerituytrueiwoq View Post
    i went there (and then on to the tampermonkey.net site) to look for API documentation to see how it can be used. i could not find any. so i cannot judge this.
    Mask wearer, Social distancer, System Administrator, Programmer, Linux advocate, Command Line user, Ham radio operator (KA9WGN/8, tech), Photographer (hobby), occasional tweeter

  7. #7
    Join Date
    Jan 2010
    Location
    Wheeling WV USA
    Beans
    1,791
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: it would be nice to have a feature in firefox ...

    Quote Originally Posted by halogen2 View Post
    Usually Javascript and JSON for the code, HTML/CSS for the UI. See documentation.
    it seems that my best choice will be to develop an extension.

    my project is to improve the UI of the ancestry.com web site for myself and other paying users. one lacking feature is the ability to copy or compare branches between trees.
    Mask wearer, Social distancer, System Administrator, Programmer, Linux advocate, Command Line user, Ham radio operator (KA9WGN/8, tech), Photographer (hobby), occasional tweeter

  8. #8
    Join Date
    Aug 2020
    Location
    The Server Room
    Beans
    38
    Distro
    Ubuntu

    Re: it would be nice to have a feature in firefox ...

    yup would have been nice

  9. #9
    Join Date
    Jun 2009
    Location
    0:0:0:0:0:0:0:1
    Beans
    5,005
    Distro
    Xubuntu

    Re: it would be nice to have a feature in firefox ...

    Quote Originally Posted by Skaperen View Post
    i went there (and then on to the tampermonkey.net site) to look for API documentation to see how it can be used. i could not find any. so i cannot judge this.
    It is just native JavaScript, the script you make will run during page load
    TamperMonkey based on GreaseMonkey
    https://wiki.greasespot.net/Greasemonkey_Manual:API
    https://www.tampermonkey.net/documentation.php

    in JS you can click a button like this
    Code:
    inputElement.click();
    or if it is not a input/button element you may want to do it like this
    Code:
    element.dispatchEvent(new Event('click'));
    here is a example of something you may want to automate (youtube set to dark mode and stop autoplay; great for private windows)
    https://pastebin.com/EqNAW55j
    Last edited by pqwoerituytrueiwoq; September 13th, 2020 at 10:49 AM.
    Laptop: ASUS A54C-NB91 (Storage: WD3200BEKT + MKNSSDCR60GB-DX); Desktop: Custom Build - Images included; rPi Server
    Putting your Networked Printer's scanner software to shame PHP Scanner Server
    I frequently edit my post when I have the last post

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •