• How to refresh Android Firefox via http... or to restart Firefox app?

    From Wendelin Uez@21:1/5 to All on Thu Feb 29 15:50:27 2024
    I make my smartphone Firefox app running a command like http://URL?something via touching a homescreen icon. This will start the Firefox app, open a new tab, calling URL and transmitting <something> just as wanted.

    But if Firefox has already started and a tab has already been opend with
    this URL then the app only switches to this tab but does not send
    <something> again. But I would like to force sending the command also if the tab is already opened.

    Is there a setting available or a http command to open an additional tab, or
    to close or refresh the existing one, using something like http:URL?......,
    or even to close the browser completely by a http command?


    What I want to do is to control a WLAN wall socket switching to ON or OFF
    mode using two icons on my Android smartphone device, one with http://<IP-No>?.....ON and http://<IP-No>?.....OFF .This works very fine if the URL is not already opened. So I need an addtional command to close an opened tab, in worst case to close an opened Firefox app by touching a third homescreen icon.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Royal@21:1/5 to Wendelin Uez on Thu Feb 29 16:48:16 2024
    "Wendelin Uez" <wuez@online.de> Wrote in message:

    I make my smartphone Firefox app running a command like http://URL?something via touching a homescreen icon. This will start the Firefox app, open a new tab, calling URL and transmitting <something> just as wanted.

    But if Firefox has already started and a tab has already been opend with
    this URL then the app only switches to this tab but does not send
    <something> again. But I would like to force sending the command also if the tab is already opened.

    Is there a setting available or a http command to open an additional tab, or to close or refresh the existing one, using something like http:URL?......, or even to close the browser completely by a http command?


    What I want to do is to control a WLAN wall socket switching to ON or OFF mode using two icons on my Android smartphone device, one with http://<IP-No>?.....ON and http://<IP-No>?.....OFF .This works very fine if the URL is not already opened. So I need an addtional command to close an opened tab, in worst case to close an opened Firefox app by touching a third homescreen icon.

    Not what you asked, but:

    In my router (a UK BT Home Hub) I can give names to devices. For example, my RPi which is at 192.168.1.12 is called 'pi'. It has a webserver which I can call with http://pi - which is simpler than http://192.168.1.12

    The router is acting as a local DNS. I don't know if this is
    common. I don't know if my previous routers could do it - I
    discovered it by accident.

    If your router can do that, try using the two alternative URLs for
    on and off. Firefox on Android opens different tabs for
    them.
    --
    Remove numerics from my email address.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Royal@21:1/5 to Wendelin Uez on Thu Feb 29 21:00:18 2024
    "Wendelin Uez" <wuez@online.de> Wrote in message:

    I make my smartphone Firefox app running a command like http://URL?something via touching a homescreen icon. This will start the Firefox app, open a new tab, calling URL and transmitting <something> just as wanted.

    But if Firefox has already started and a tab has already been opend with
    this URL then the app only switches to this tab but does not send
    <something> again. But I would like to force sending the command also if the tab is already opened.

    Is there a setting available or a http command to open an additional tab, or to close or refresh the existing one, using something like http:URL?......, or even to close the browser completely by a http command?


    What I want to do is to control a WLAN wall socket switching to ON or OFF mode using two icons on my Android smartphone device, one with http://<IP-No>?.....ON and http://<IP-No>?.....OFF .This works very fine if the URL is not already opened. So I need an addtional command to close an opened tab, in worst case to close an opened Firefox app by touching a third homescreen icon.

    AFAICT the query string is part of the URL so I don't think it
    should behave as you describe. I did a test - Firefox on Android
    123.0

    I called http://192.168.1.12/?a=x
    (Welcome to nginx it replied.)
    I saved that URL on the home screen.
    I then did the same with http://192.168.1.12/?a=y
    I close both tabs.
    I tap the 'a=x' one - it opens.
    I tap the 'a=y' one - it opens a second tab.

    In what way does your URL - including the query string -
    fundamentally differ from that test?
    --
    Remove numerics from my email address.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From VanguardLH@21:1/5 to Wendelin Uez on Thu Feb 29 17:20:55 2024
    Wendelin Uez <wuez@online.de> wrote:

    I make my smartphone Firefox app running a command like
    http://URL?something via touching a homescreen icon. This will start
    the Firefox app, open a new tab, calling URL and transmitting
    <something> just as wanted.

    But if Firefox has already started and a tab has already been opend
    with this URL then the app only switches to this tab but does not
    send <something> again. But I would like to force sending the command
    also if the tab is already opened.

    That's reusing an existing web session. Does the shortcut let you
    specify to open a private instance (incognito) of Firefox? Each private session gets its own separate session ID. It's how, for example, you
    could be logged into a web site, but want another instance of Firefox to
    login again, and keep both web sessions active and separate. With
    desktop Firefox, you can use the -private command-line arg to open a new private window for Firefox. You can also use -private-window and -private-windows <URL>.

    While there are command-line args you can specify for loading Firefox on
    a desktop (Windows or Linux), Firefox Android is really a different web browser, and Android apps are often far less robust or more crippled
    than their desktop cousins. I've not created shortcuts to load any app
    other than the shortcuts the app installers created, so I don't know
    what you can tailor in the shortcut.

    https://wiki.mozilla.org/Firefox/CommandLineOptions
    (no mention of Android or iOS when using mobile Firefox)

    Maybe some or all of the desktop Firefox command-line options are
    available for the mobile Firefox.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Royal@21:1/5 to VanguardLH on Fri Mar 1 08:05:05 2024
    VanguardLH <V@nguard.LH> Wrote in message:

    Wendelin Uez <wuez@online.de> wrote:

    I make my smartphone Firefox app running a command like
    http://URL?something via touching a homescreen icon. This will start
    the Firefox app, open a new tab, calling URL and transmitting
    <something> just as wanted.

    But if Firefox has already started and a tab has already been opend
    with this URL then the app only switches to this tab but does not
    send <something> again. But I would like to force sending the command
    also if the tab is already opened.

    That's reusing an existing web session. Does the shortcut let you
    specify to open a private instance (incognito) of Firefox? Each private session gets its own separate session ID. It's how, for example, you
    could be logged into a web site, but want another instance of Firefox to login again, and keep both web sessions active and separate. With
    desktop Firefox, you can use the -private command-line arg to open a new private window for Firefox. You can also use -private-window and -private-windows <URL>.

    While there are command-line args you can specify for loading Firefox on
    a desktop (Windows or Linux), Firefox Android is really a different web browser, and Android apps are often far less robust or more crippled
    than their desktop cousins. I've not created shortcuts to load any app
    other than the shortcuts the app installers created, so I don't know
    what you can tailor in the shortcut.

    https://wiki.mozilla.org/Firefox/CommandLineOptions
    (no mention of Android or iOS when using mobile Firefox)

    Maybe some or all of the desktop Firefox command-line options are
    available for the mobile Firefox.

    No command line options. You set the desktop icon from within Fx
    and cannot edit it. The same is true with pinned shortcuts, which
    is very irritating because you can edit query strings.

    But, as I wrote, I can't see how his ON and OFF icons both reopen
    the same tab. So I suspect I misunderstand what this 'webpage'
    does or what he's doing.
    --
    Remove numerics from my email address.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Royal@21:1/5 to Dave Royal on Fri Mar 1 08:07:05 2024
    Dave Royal <dave@dave123royal.com> Wrote in message:

    VanguardLH <V@nguard.LH> Wrote in message:

    Wendelin Uez <wuez@online.de> wrote:

    I make my smartphone Firefox app running a command like
    http://URL?something via touching a homescreen icon. This will start
    the Firefox app, open a new tab, calling URL and transmitting
    <something> just as wanted.

    But if Firefox has already started and a tab has already been opend
    with this URL then the app only switches to this tab but does not
    send <something> again. But I would like to force sending the command
    also if the tab is already opened.

    That's reusing an existing web session. Does the shortcut let you
    specify to open a private instance (incognito) of Firefox? Each private
    session gets its own separate session ID. It's how, for example, you
    could be logged into a web site, but want another instance of Firefox to
    login again, and keep both web sessions active and separate. With
    desktop Firefox, you can use the -private command-line arg to open a new
    private window for Firefox. You can also use -private-window and
    -private-windows <URL>.

    While there are command-line args you can specify for loading Firefox on
    a desktop (Windows or Linux), Firefox Android is really a different web
    browser, and Android apps are often far less robust or more crippled
    than their desktop cousins. I've not created shortcuts to load any app
    other than the shortcuts the app installers created, so I don't know
    what you can tailor in the shortcut.

    https://wiki.mozilla.org/Firefox/CommandLineOptions
    (no mention of Android or iOS when using mobile Firefox)

    Maybe some or all of the desktop Firefox command-line options are
    available for the mobile Firefox.

    No command line options. You set the desktop icon from within Fx
    and cannot edit it. The same is true with pinned shortcuts, which
    is very irritating because you can edit query strings.

    But, as I wrote, I can't see how his ON and OFF icons both reopen
    the same tab. So I suspect I misunderstand what this 'webpage'
    does or what he's doing.

    ^^^^^^
    _cannot_ edit query strings
    --
    Remove numerics from my email address.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Theo@21:1/5 to Dave Royal on Fri Mar 1 12:11:53 2024
    Dave Royal <dave@dave123royal.com> wrote:
    But, as I wrote, I can't see how his ON and OFF icons both reopen
    the same tab. So I suspect I misunderstand what this 'webpage'
    does or what he's doing.

    I'd guess he was two URLs:
    https://example.com/pod-bay-doors?state=OPEN https://example.com/pod-bay-doors?state=CLOSE

    The problem is that he presses OPEN and it works, then he presses CLOSE and
    it works, but if he presses OPEN again it just shows the already-present
    OPEN tab rather than re-fetching the OPEN page again.

    Theo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Royal@21:1/5 to Theo on Fri Mar 1 12:49:03 2024
    On Fri, 01 Mar 2024 12:11:53 +0000, Theo wrote:

    Dave Royal <dave@dave123royal.com> wrote:
    But, as I wrote, I can't see how his ON and OFF icons both reopen
    the same tab. So I suspect I misunderstand what this 'webpage'
    does or what he's doing.

    I'd guess he was two URLs:
    https://example.com/pod-bay-doors?state=OPEN https://example.com/pod-bay-doors?state=CLOSE

    The problem is that he presses OPEN and it works, then he presses CLOSE
    and it works, but if he presses OPEN again it just shows the
    already-present OPEN tab rather than re-fetching the OPEN page again.

    That's plausible. In that case I'd add some javascript into the page (greasemonkey runs on Fx/Android) to detect the reopening and resend the
    data. Or if there is no suitable tab event, close the page automatically
    after a time period. Or something...
    --
    (Remove any numerics from my email address.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Royal@21:1/5 to Wendelin Uez on Fri Mar 1 14:28:37 2024
    On Fri, 01 Mar 2024 15:15:40 +0100, Wendelin Uez wrote:

    "Dave Royal" <dave@dave123royal.com> schrieb im Newsbeitrag news:ursirv$17ncc$2@dont-email.me...
    On Fri, 01 Mar 2024 12:11:53 +0000, Theo wrote:

    Dave Royal <dave@dave123royal.com> wrote:
    But, as I wrote, I can't see how his ON and OFF icons both reopen
    the same tab. So I suspect I misunderstand what this 'webpage'
    does or what he's doing.

    I'd guess he was two URLs:
    https://example.com/pod-bay-doors?state=OPEN
    https://example.com/pod-bay-doors?state=CLOSE

    The problem is that he presses OPEN and it works, then he presses
    CLOSE and it works, but if he presses OPEN again it just shows the
    already-present OPEN tab rather than re-fetching the OPEN page again.

    That's plausible.

    Yes, Theo is right. I really get 2 tabs, one for ON and one for OFF, and
    an existing one cannot be overwritten next time.

    In that case I'd add some javascript into the page (greasemonkey runs
    on Fx/Android) to detect the reopening and resend the data. Or if there
    is no suitable tab event, close the page automatically after a time
    period. Or something...

    Thank you for greamonkey hint. All what I found for now looks like greasemonkey could do that, but as I am not familiar with HTML scripting
    I must search for examples now. It would be great if I could close automatically the page sent by the device, I don't need the device's
    output and could close the tab immediately.

    Can you capture the webpage and any linked files (.js particularly) and
    post them somewhere?
    --
    (Remove any numerics from my email address.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wendelin Uez@21:1/5 to Dave Royal on Fri Mar 1 15:15:40 2024
    "Dave Royal" <dave@dave123royal.com> schrieb im Newsbeitrag news:ursirv$17ncc$2@dont-email.me...
    On Fri, 01 Mar 2024 12:11:53 +0000, Theo wrote:

    Dave Royal <dave@dave123royal.com> wrote:
    But, as I wrote, I can't see how his ON and OFF icons both reopen
    the same tab. So I suspect I misunderstand what this 'webpage'
    does or what he's doing.

    I'd guess he was two URLs:
    https://example.com/pod-bay-doors?state=OPEN
    https://example.com/pod-bay-doors?state=CLOSE

    The problem is that he presses OPEN and it works, then he presses CLOSE
    and it works, but if he presses OPEN again it just shows the
    already-present OPEN tab rather than re-fetching the OPEN page again.

    That's plausible.

    Yes, Theo is right. I really get 2 tabs, one for ON and one for OFF, and an existing one cannot be overwritten next time.

    In that case I'd add some javascript into the page
    (greasemonkey runs on Fx/Android) to detect the reopening and resend the data. Or if there is no suitable tab event, close the page automatically after a time period. Or something...

    Thank you for greamonkey hint. All what I found for now looks like
    greasemonkey could do that, but as I am not familiar with HTML scripting I
    must search for examples now. It would be great if I could close
    automatically the page sent by the device, I don't need the device's output
    and could close the tab immediately.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Theo@21:1/5 to Wendelin Uez on Fri Mar 1 16:34:05 2024
    Wendelin Uez <wuez@online.de> wrote:

    "Dave Royal" <dave@dave123royal.com> schrieb im Newsbeitrag news:ursirv$17ncc$2@dont-email.me...
    On Fri, 01 Mar 2024 12:11:53 +0000, Theo wrote:

    Dave Royal <dave@dave123royal.com> wrote:
    But, as I wrote, I can't see how his ON and OFF icons both reopen
    the same tab. So I suspect I misunderstand what this 'webpage'
    does or what he's doing.

    I'd guess he was two URLs:
    https://example.com/pod-bay-doors?state=OPEN
    https://example.com/pod-bay-doors?state=CLOSE

    The problem is that he presses OPEN and it works, then he presses CLOSE
    and it works, but if he presses OPEN again it just shows the
    already-present OPEN tab rather than re-fetching the OPEN page again.

    That's plausible.

    Yes, Theo is right. I really get 2 tabs, one for ON and one for OFF, and an existing one cannot be overwritten next time.

    In that case I'd add some javascript into the page
    (greasemonkey runs on Fx/Android) to detect the reopening and resend the data. Or if there is no suitable tab event, close the page automatically after a time period. Or something...

    Thank you for greamonkey hint. All what I found for now looks like greasemonkey could do that, but as I am not familiar with HTML scripting I must search for examples now. It would be great if I could close automatically the page sent by the device, I don't need the device's output and could close the tab immediately.

    Could you put a button on the ON and OFF page which says 'repeat'. ie you first visit:

    https://example.com/whatever?state=ON

    and it works. The second time it just brings this page up again, at which point you press the Repeat button on the page and it sends the 'ON' action again.

    You could do that by making a second page whose only job it is to fetch the target, eg via an iframe or similar, and a button to refresh the iframe.

    Theo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wendelin Uez@21:1/5 to All on Fri Mar 1 20:12:26 2024
    As I already wrote the URL controls a WLAN wall socket switching to ON or
    OFF via http://127.168.178.99?cmd,,,,ON|OFF .

    These commands generate a blank page with text answer {!POWER":"ON|OFF"}
    which I cannot modify.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Royal@21:1/5 to Wendelin Uez on Sat Mar 2 08:54:45 2024
    "Wendelin Uez" <wuez@online.de> Wrote in message:

    As I already wrote the URL controls a WLAN wall socket switching to ON or OFF via http://127.168.178.99?cmd,,,,ON|OFF .

    These commands generate a blank page with text answer {!POWER":"ON|OFF"} which I cannot modify.

    Try this:
    // ==UserScript==
    // @name Close tab after interval
    // @version 1
    // @include https://127.168.178.99/*
    // @grant none
    // ==/UserScript==
    setTimeout(window.close,5000);
    --
    Remove numerics from my email address.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Royal@21:1/5 to Dave Royal on Sat Mar 2 12:24:47 2024
    On Sat, 02 Mar 2024 12:20:11 +0000, Dave Royal wrote:

    On Sat, 02 Mar 2024 08:54:45 +0000, Dave Royal wrote:

    Try this:
    // ==UserScript==
    // @name Close tab after interval // @version 1 // @include
    https://127.168.178.99/*
    // @grant none // ==/UserScript== setTimeout(window.close,5000);

    Which on PAN/linux will I hope look better like this

    // ==UserScript==
    // @name Close tab after interval // @version 1 // @include https://127.168.178.99/*
    // @grant none // ==/UserScript==
    setTimeout(window.close,5000);

    Which it doesn't.
    Oh well, you get the idea.
    --
    (Remove any numerics from my email address.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Royal@21:1/5 to Dave Royal on Sat Mar 2 12:20:11 2024
    On Sat, 02 Mar 2024 08:54:45 +0000, Dave Royal wrote:

    "Wendelin Uez" <wuez@online.de> Wrote in message:

    As I already wrote the URL controls a WLAN wall socket switching to ON
    or OFF via http://127.168.178.99?cmd,,,,ON|OFF .

    These commands generate a blank page with text answer
    {!POWER":"ON|OFF"} which I cannot modify.

    Try this:
    // ==UserScript==
    // @name Close tab after interval // @version 1 // @include
    https://127.168.178.99/*
    // @grant none // ==/UserScript== setTimeout(window.close,5000);

    Which on PAN/linux will I hope look better like this

    // ==UserScript==
    // @name Close tab after interval
    // @version 1
    // @include https://127.168.178.99/*
    // @grant none
    // ==/UserScript==
    setTimeout(window.close,5000);
    --
    (Remove any numerics from my email address.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wendelin Uez@21:1/5 to All on Sun Mar 3 18:31:30 2024
    Thank you for the script.

    I installed Greasemonkey on my Android smartphone and copied your script
    into a .user.js file but I cannot find a Firefox menu entry to select and
    load a script file.

    Although Greasemonkey is listed under "Add-Ons" what means a successfull installation there is no menu entry or option or button to load or run a script, there is only an option button to activate/deactivate the add-on, another one to include private mode, and two buttons to remove the add-on or
    to notify Mozilla about the add-on.

    So I first have to find out how I can load and run a .user.js script file in the smartphone's Firefox app.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Royal@21:1/5 to Wendelin Uez on Sun Mar 3 18:30:48 2024
    "Wendelin Uez" <wuez@online.de> Wrote in message:

    Thank you for the script.

    I installed Greasemonkey on my Android smartphone and copied your script
    into a .user.js file but I cannot find a Firefox menu entry to select and load a script file.

    Although Greasemonkey is listed under "Add-Ons" what means a successfull installation there is no menu entry or option or button to load or run a script, there is only an option button to activate/deactivate the add-on, another one to include private mode, and two buttons to remove the add-on or to notify Mozilla about the add-on.

    So I first have to find out how I can load and run a .user.js script file in the smartphone's Firefox app.

    I've not used a .user.js file with Android. Do it this way:

    - Load any website - http://example.com
    - Top right menu, Addons, Greasemonkey: Page should say
    'Greasemonkey active'
    - Select New userscript: page shows a template
    - Delete all that and paste my userscript to replace it
    - Tap the 'save' diskette icon top left
    - Close that tab, open the GM addon again and it should show the
    userscript. It will run next time a site matching the 'include'
    pattern loads.

    You could replace my single include with two - one for the exact
    'ON' URL and one for 'OFF'. Then you will be able to access the
    device in Firefox without it closing.

    I tested it with my printer's status web page.
    --
    Remove numerics from my email address.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Royal@21:1/5 to Wendelin Uez on Sun Mar 3 22:42:12 2024
    "Wendelin Uez" <wuez@online.de> Wrote in message:

    So I first have to find out how I can load and run a .user.js script file in the smartphone's Firefox app.

    I could find no way of loading a .user.js file from the device
    itself now that you cannot use the file:/// protocol, which is
    how I did it on firefox desktop.

    I could only do it over http(s) like this example: <https://www.cjoint.com/data/NCdwD5C37v4_close-tab.user.js>
    If you have Greasemonkey active that should offer to install the
    script.

    I don't think the export and import backup works either. I suspect
    that's because, here on Android 13, it doesn't have the old
    'files' permission.
    --
    Remove numerics from my email address.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Royal@21:1/5 to Wendelin Uez on Tue Mar 5 15:07:18 2024
    "Wendelin Uez" <wuez@online.de> Wrote in message:

    I've not used a .user.js file with Android. Do it this way:

    - Load any website - http://example.com
    - Top right menu, Addons, Greasemonkey: Page should say
    'Greasemonkey active'
    - Select New userscript:

    While there is option "Activated" on true there are only following options/buttons, and no "Select New Userscript" or similar:
    - Option Button "execute in private mode"
    - Ifo-Button "Details"
    - Info-Button "Rights"
    - Touch-Button "Remove"
    - Touch-Buttin "Report"
    That's all I have.

    Firefox 123.0, Android 11


    You're looking at the Firefox addons page.

    You must start with a webpage dusplayed - any webpage, not an
    empty browser. Then you will see the monkey icon when you select
    Addons.

    --
    Remove numerics from my email address.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wendelin Uez@21:1/5 to All on Tue Mar 5 15:54:06 2024
    I've not used a .user.js file with Android. Do it this way:

    - Load any website - http://example.com
    - Top right menu, Addons, Greasemonkey: Page should say
    'Greasemonkey active'
    - Select New userscript:

    While there is option "Activated" on true there are only following options/buttons, and no "Select New Userscript" or similar:
    - Option Button "execute in private mode"
    - Ifo-Button "Details"
    - Info-Button "Rights"
    - Touch-Button "Remove"
    - Touch-Buttin "Report"
    That's all I have.

    Firefox 123.0, Android 11


    Ok, I'm searching now a more user friendly browser and will test
    Greasemonkey there.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Royal@21:1/5 to Dave Royal on Tue Mar 5 15:38:12 2024
    Dave Royal <dave@dave123royal.com> Wrote in message:

    You must start with a webpage dusplayed - any webpage, not an
    empty browser. Then you will see the monkey icon when you select
    Addons.

    Screenshots:
    With a webpage displayed select 'addons' in menu <https://www.cjoint.com/data/NCfpAqOGlA4_Screenshot-20240305-152419-Firefox.jpg>
    Tap 'greasemonkey' <https://www.cjoint.com/data/NCfpClRFng4_Screenshot-20240305-152448-Firefox.jpg>
    Select 'new user script'
    Replace existing template code with my code
    Tap 'save' diskette icon.
    Close tab.

    When you test it, try it first with another tab open as well - eg
    example.com
    I'll explain why once you get it working.
    --
    Remove numerics from my email address.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wendelin Uez@21:1/5 to All on Wed Mar 6 16:59:14 2024
    You must start with a webpage dusplayed - any webpage, not an
    empty browser. Then you will see the monkey icon when you select
    Addons.

    Yes, now I can find the Greasemonkey menu, edit the template and save it. as CloseTabAfterInterval, and even after restarting Firefox app this script is still there, as expected, and still activated. So far, so good.

    But it still doesn't close the tab after calling URL http://192.168.178.99......

    I tried http as well as https because my local net uses http only.

    I suppose "setTimeout(window.close,5000);" should close the tab after 5000 mSec?

    For testing I added a second script line "@include https:/google.com", and nothing closed, too.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Royal@21:1/5 to Wendelin Uez on Wed Mar 6 19:19:16 2024
    "Wendelin Uez" <wuez@online.de> Wrote in message:

    You must start with a webpage dusplayed - any webpage, not an
    empty browser. Then you will see the monkey icon when you select
    Addons.

    Yes, now I can find the Greasemonkey menu, edit the template and save it. as CloseTabAfterInterval, and even after restarting Firefox app this script is still there, as expected, and still activated. So far, so good.

    But it still doesn't close the tab after calling URL http://192.168.178.99......

    I tried http as well as https because my local net uses http only.

    I suppose "setTimeout(window.close,5000);" should close the tab after 5000 mSec?

    For testing I added a second script line "@include https:/google.com", and nothing closed, too.

    Do a step-by-step diagnosis.
    1 Edit the script include to http://example.com/* (only)
    2 Load another webpage so that you will have > 1 tab open (important).
    3 Open a new tab & type http://example.com
    4 If it does not close after 5" open the greasmonkey menu.
    5 Does it show the script as 'User scripts for this tab'?
    If not the include is wrong.
    If it does then something else is wrong

    --
    Remove numerics from my email address.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wendelin Uez@21:1/5 to All on Thu Mar 7 16:53:06 2024
    *m sorry, it still doesn't work.

    I verified Greasemonkey script code for CloseTabAfterInterval:

    // ==UserScript==
    // @name Close tab after interval
    // @version 1
    // @include http://example.com
    // @grant none
    // ==/UserScript==
    setTimeout(window.close,5000);

    Then I...

    - started Firefox app, no old tabs open

    - verified Greasemonkey activated

    - added new tab 1 and opened http://info.com

    - added new tab 2 and opened http://example.com

    - tab doesn't close


    Then I checked Greasemonkey menu (entries translated from German).
    There is no "User scripts for this tab" or similar.

    main menu:
    # Greasemonkey is activated (checked)
    # Greasemonkey Options
    # --------------------
    # other user concepts
    # CloseTabAfterInterval
    # --------------------
    # New User Script...
    # Export...
    # Import...
    # --------------------
    # Greasemonkey Homepage
    # Greasemonkey Wiki
    # User Scripts in network

    selecting main menu CloseTabAfterInterval returns
    submenu 1:
    # CloseTabAfterInterval
    # --------------------
    # Activated (checked)
    # Edit
    # Deinstall
    # Userscript Options
    # --------------------
    # Version 1

    selecting main menu Greasemonkey Options returns
    submenu 2
    # Global Exceptions
    empty listbox plus a line with
    "+ Ignore https://example.com/*"
    # Editor
    "Use enhanced editor" checked

    selecting submenu 1 UserScript Options returns
    subpage 1
    * automatic update deactivated
    * update now
    * Userdefined Includes: empty box
    - "use only these ones" unchecked
    * Userdefined Excludes: empty box
    - "use only these ones" unchecked
    * Userdefined Matches: empty box
    - rest of page invisible because page can not be scrolled up/down


    Question:

    What do I have to enter in script's last line instead of "setTimeout..."
    to test for another function, f.e. displaying a messagebox , loading
    a website, or anything else? Maybe only the setTimeout function
    does not work here.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Royal@21:1/5 to Wendelin Uez on Thu Mar 7 17:00:06 2024
    "Wendelin Uez" <wuez@online.de> Wrote in message:

    *m sorry, it still doesn't work.

    I verified Greasemonkey script code for CloseTabAfterInterval:

    // ==UserScript==
    // @name Close tab after interval
    // @version 1
    // @include http://example.com
    // @grant none
    // ==/UserScript==
    setTimeout(window.close,5000);

    Then I...

    - started Firefox app, no old tabs open

    - verified Greasemonkey activated

    - added new tab 1 and opened http://info.com

    - added new tab 2 and opened http://example.com

    - tab doesn't close


    Then I checked Greasemonkey menu (entries translated from German).
    There is no "User scripts for this tab" or similar.

    That means there is no script matching the include

    main menu:
    # Greasemonkey is activated (checked)
    # Greasemonkey Options
    # --------------------
    # other user concepts
    # CloseTabAfterInterval
    # --------------------
    # New User Script...
    # Export...
    # Import...
    # --------------------
    # Greasemonkey Homepage
    # Greasemonkey Wiki
    # User Scripts in network

    selecting main menu CloseTabAfterInterval returns
    submenu 1:
    # CloseTabAfterInterval
    # --------------------
    # Activated (checked)
    # Edit
    # Deinstall
    # Userscript Options
    # --------------------
    # Version 1

    selecting main menu Greasemonkey Options returns
    submenu 2
    # Global Exceptions
    empty listbox plus a line with
    "+ Ignore https://example.com/*"

    That suggests the current tab is https
    Have you got https-only mode set in Fx settings?
    Change include to https

    # Editor
    "Use enhanced editor" checked

    selecting submenu 1 UserScript Options returns
    subpage 1
    * automatic update deactivated
    * update now
    * Userdefined Includes: empty box
    - "use only these ones" unchecked
    * Userdefined Excludes: empty box
    - "use only these ones" unchecked
    * Userdefined Matches: empty box
    - rest of page invisible because page can not be scrolled up/down


    Question:

    What do I have to enter in script's last line instead of "setTimeout..."
    to test for another function, f.e. displaying a messagebox , loading
    a website, or anything else? Maybe only the setTimeout function
    does not work here.

    alert("Hello")
    --
    Remove numerics from my email address.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Royal@21:1/5 to Dave Royal on Thu Mar 7 17:25:56 2024
    Dave Royal <dave@dave123royal.com> Wrote in message:

    "Wendelin Uez" <wuez@online.de> Wrote in message:

    *m sorry, it still doesn't work.

    I verified Greasemonkey script code for CloseTabAfterInterval:

    // ==UserScript==
    // @name Close tab after interval
    // @version 1
    // @include http://example.com
    // @grant none
    // ==/UserScript==
    setTimeout(window.close,5000);

    Then I...

    - started Firefox app, no old tabs open

    - verified Greasemonkey activated

    - added new tab 1 and opened http://info.com

    - added new tab 2 and opened http://example.com

    - tab doesn't close


    Then I checked Greasemonkey menu (entries translated from German).
    There is no "User scripts for this tab" or similar.

    That means there is no script matching the include

    main menu:
    # Greasemonkey is activated (checked)
    # Greasemonkey Options
    # --------------------
    # other user concepts
    # CloseTabAfterInterval
    # --------------------
    # New User Script...
    # Export...
    # Import...
    # --------------------
    # Greasemonkey Homepage
    # Greasemonkey Wiki
    # User Scripts in network

    selecting main menu CloseTabAfterInterval returns
    submenu 1:
    # CloseTabAfterInterval
    # --------------------
    # Activated (checked)
    # Edit
    # Deinstall
    # Userscript Options
    # --------------------
    # Version 1

    selecting main menu Greasemonkey Options returns
    submenu 2
    # Global Exceptions
    empty listbox plus a line with
    "+ Ignore https://example.com/*"

    That suggests the current tab is https
    Have you got https-only mode set in Fx settings?
    Change include to https

    # Editor
    "Use enhanced editor" checked

    selecting submenu 1 UserScript Options returns
    subpage 1
    * automatic update deactivated
    * update now
    * Userdefined Includes: empty box
    - "use only these ones" unchecked
    * Userdefined Excludes: empty box
    - "use only these ones" unchecked
    * Userdefined Matches: empty box
    - rest of page invisible because page can not be scrolled up/down


    Question:

    What do I have to enter in script's last line instead of "setTimeout..."
    to test for another function, f.e. displaying a messagebox , loading
    a website, or anything else? Maybe only the setTimeout function
    does not work here.

    alert("Hello")

    In my tests I eventually put both http and https:
    // @include http://192.168.1.20/*
    // @include https://192.168.1.20/*

    I tested with https-only off, and the desktop icon uses http. But it still calls http (no padlock) and works (closes) even now I have http-only on. Maybe http-only aplies only to URLs _entered_ in the URL bar.
    --
    Remove numerics from my email address.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)