[Lab] Automatic OK dialog for a specific site - Browser Extension

Alan Gardner alanctgardner at gmail.com
Tue Jun 10 10:08:01 EDT 2014


"confirm" is a JS method which creates a yes/no dialog. You probably need
the $.get(remoteURL) call to update a session cookie. Your best bet is to
override callServer with the exact same code, but instead of confirm use
var extend_session=true


On Tue, Jun 10, 2014 at 10:04 AM, Michael Lechasseur <mlecha at artengine.ca>
wrote:

>  Looking into writing a little Chrome Extension or Firefox add-on to
> automatically click OK on a specific dialog to keep a user logged in and
> retain her sanity.
>
> The dialog looks like this in Firefox. Not sure if that's a native dialog
> or something created by javascript, or even if the two would even look
> dissimilar?
>
>
>
> Code on the page:
>
>     function callserver()
>     {
>
>         var extend_session = confirm("Your session is about to expire.
> Press OK to keep your session active.");
>         if (extend_session == true)
>         {
>             var remoteURL = '//includes/session.cfm';
>             $.get(remoteURL,  function(data){
>                 //do nothing
>             });
>         }
>
>     }
>
> Any thoughts? Perhaps just override the callserver() function somehow and
> return TRUE?
>
>
>
>
> _______________________________________________
> Lab mailing list
> 1. subscribe http://artengine.ca/mailman/listinfo/lab
> 2. then email Lab at artengine.ca to send your message to the list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://artengine.ca/pipermail/lab/attachments/20140610/a9d7c3da/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ihiiidie.png
Type: image/png
Size: 160227 bytes
Desc: not available
URL: <http://artengine.ca/pipermail/lab/attachments/20140610/a9d7c3da/attachment-0001.png>


More information about the Lab mailing list