I have about 10+ tabs open in my browser with each containing a button I need to click, in intervals of about 20-30 minutes.
I am looking for some kind of autoclick solution so that I don't have to go back to my browser every 20-30 minutes and manually click the button.
I downloaded an extension for Firefox called Autoclick but this didn't work. I'm thinking if there is maybe a better solution so that I can program these buttons in advance to be clicked in the interval I specify.
I am not sure here what the best solution would be. I'm wondering if anyone would have an idea.
I do not own this domain by the way so altering the source code of the form that needs to be sent is no solution.
You can give Selenium a try. It can be installed as a plugin/extension in your browser.
Selenium for chrome for example can record your actions and then playback them for you automatically.
Not sure about multiple tabs, but it should be possible.
Related
I am working with 5 different websites which have short session life, they log out in 10 - 15 mins of inactivity.
I came up with browser extension to do the jon for me.
and what I did so far:
reloading the page.
open another tab from the same host and close it automatically.
switch tabs to be active automatically ( like every 2 minutes one of thes websites becomes active).
those seems to be working, but they had very bad user experience.
also, reloading the page might cause losses of the work that I am doing.
I tried to make some requests on the background but these websites use alot of headers and cookies which seems to be very hard to figure out how to use them.
is there a better way to stop logging off due to inactivity or a proper way to figure out which headers and cookies should I attach with my request??
I really don't know which stack these websites are using but it seems that they have a high security standards.
What I tend to do is once the "Are you still there?" message pops up, I right click, inspect, copy the selector, then do this in the console:
# paste your selector in this variable
selector = "#j_idt473 > div.modal-footer > a.btn.btn-primary.btn-sm"
document.querySelector(selector).click()
If that works, I then put it in a intervalID = window.setInterval(callback, milliseconds) call. I stop the loop with window.clearInterval(intervalID) if needed.
Not sure if you'd consider a realtime hack, this is StackOverflow after all.
This is pretty insane. I've built a VueJS based frontend for an order recieving application. Technically I'm making an ajax call every two minutes to check for orders. If there are any orders I have it play a sound. This I've implemented by calling play on an hTML audio element.
The problem is that if the browser tab is not focused or if the user is on another tab. The sound doesn't play. I've even changed the code to instead of playing a sound file - refresh a hidden iframe that loaded the sound file. But that also doesn't seem to work if the browser is out of focus. What exactly am I missing here.
-- EDIT
My situation is that - the user would have multiple browser tabs open and the only way to alert the user would be via a unique sound that would be played. I know it can be done because there are a number of other sites that do this somehow. I'm not sure how. Is there a way to force focus back to the tab using javascript?
I caught myself wanting to make a cross-tab sound controller and i have done some research on this, but i can't really find a good way to go about controlling the sound for all elements in all open tabs.
Does anyone know of any way with jq, js, or anything else that can run in a browser that can be used to controll the volume of all open (and new) tabs?
The use-case would eks be muting all tabs with one button, adjusting up or down the total "browser volume" in one place, and such.
I haven't been able to find any support for this so far, so does that mean it really is impossible after all?
Edit:
The main thing is that this needs to be "cross-tab" and not just a way to adjust a single audio player / audio source playing in a single tab. Say you have 5 tabs with Youtube open and i want to be able to mute / lower volume / raise volume of all those tabs from one single tab.
It depends what you mean by "In the browser". I think that you will only really be able to accomplish this as a browser plug-in or extension. That may not be what you're looking for, but browser extensions can implement that functionality.
See: https://developer.chrome.com/extensions/samples and look at the chrome sounds sample. That might give you a good place to start.
I did find a solution for lowering the volume on one given tab. You could simply repeat it for each tab.
Check this please: Javascript: control Google Chrome's open tab audio volume control
I have this functionality built in Jquery/ javascript where a user is notified when their session is about to be timed out. Then they are given an option to extend it. If they don't make a choice the pop up closes itself and the browser is redirected to the login page. It worked perfectly fine for a while. But now I noticed it works correctly only if I am active on the computer. If the computer is left unattended for an entire day, the pop up does not begin the countdown until the user unlocks the computer and logs in again.
Is anybody aware of this behavior where ie stops executing javascript when the computer is left unattended for a long time?
Update: Is there a way to keep the tab from sleeping? Without that, the browser won't be able to redirect at the right time.
setTimeout only works when the tab is active. In some browsers even changing tab will make it stop counting. So not only if you are on the computer but if you're not on the specific page it might not work. Also on mobile devices with multitasking it's bound to fail, forget about tabs, applications often go to suspended mode.
Take a look at this question, it offers the same solution as Luka with a code example:
How can I make setInterval also work when a tab is inactive in Chrome?
You might want to do two checks on the time passed, one to check if you need to show the popup, and one to close the popup, using the total time passed instead of having a different count down.
i would suggest logging the current time when the page is loaded and then calling a function every 10 seconds of so that checks if the time passed is more than x amount, the reason your problem occurs is most likely because the default timeout function only counts down while the page is being rendered.
We have a problem with IE. On a web page with a form, multiple frames are created via javascript. This is due to some crappy WYSIWYG. The problem is that when the user clicks on the browser "back" button, you'd expect the entire page to go back. This is what happens in FF, Chrome, Opera, Safari, etc. But for IE, you have to click the back button for each frame on the page, even if you don't do anything else but load the page.
Knowing that sometimes +20 frames can be on the same page (many textfields), this is a real pain for users.
The question: how do you make the browser back button work for the main page, regardless of the amount of frames you have on the page ?
Thanks so much !
One way of doing it is to implement clientside routing using hash bang urls.
Every time a page is changed on an iframe the hash part of the parent url is changed to reflect it.
You then have some js that listens for these changes and does what is needed to updated the full page state across frames.
Now when the user pushes the back button, the parents url changes to the hash it was before the last change in the child iframe, and everything is updated accordingly.
Be aware: that this is a non-trivial thing to implement if you have many iframes, and i can't give you a working script that will fix your problem. This is meant for inspiration only.
(following Martin Jespersen response)
Yes, I also thinks that it is only solution. And it is hard to implement, but there is a lot of good libraries to handle # changes.
The lightweight jQuery solution: http://tkyk.github.com/jquery-history-plugin/.
Very complex solution with ExtJS: http://dev.sencha.com/deploy/dev/examples/history/history.html#tab1:subtab1.
And I think, that is not possible to do it realibly cross-browser without javascript.