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.
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.
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.
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.
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.
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.
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.
"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.
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...
"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.
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.
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);
"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);
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.
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:
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
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:
You must start with a webpage dusplayed - any webpage, not an
empty browser. Then you will see the monkey icon when you select
Addons.
You must start with a webpage dusplayed - any webpage, not an
empty browser. Then you will see the monkey icon when you select
Addons.
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.
empty listbox plus a line with"+ Ignore https://example.com/*"
*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.
"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")
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 297 |
Nodes: | 16 (2 / 14) |
Uptime: | 08:30:13 |
Calls: | 6,666 |
Files: | 12,213 |
Messages: | 5,336,200 |