[Lab] Automatic OK dialog for a specific site - Browser Extension
jason.cobill at gmail.com
Tue Jun 10 13:00:07 EDT 2014
Greasemonkey is built into Chrome! Try this!
1) Grab all the code below the line, and save it in a text file called
PCHPopupKiller.user.js (Make the edit I suggest below before you save)
2) In Chrome, go to chrome://extensions
3) Drag and drop this script onto the window
4) Tell chrome you allow the script. It will install. You can remove it
at any time.
There's a line in the metadata at the top of the script marked @include
- this is a wildcard that you can use to specify which pages this script
should run on. You should probably be precise to only specify the
particular page (or directory) that this annoying popup is on, so it
doesn't interfere with other important business on other PCH pages.
Let me know if it works/doesn't work! I'm overwriting the callserver
function which may not be the best way to go.
-- SCRIPT BELOW THIS LINE --------------------------------------------- VVV
// @name PCH PopupKiller
// @namespace http://www.lunarbovine.com/PCHPopuKiller
// @description Gets rid of annoying session popups on PCH pages
// @version 0.1
// @include http://pch.gc.ca/*
var extend_session = true;
if (extend_session == true)
var remoteURL = '//includes/session.cfm';
On Tue, Jun 10, 2014 at 10:30 AM, Michael Lechasseur <mlecha at artengine.ca>
> Do you think it would be easiest to inject JS with a Chrome Extension for
> that specific site?
> I'm not sure of how else I would be able to override the function?
> Thanks for the replies!
> On 10/06/2014 10:08 AM, Alan Gardner wrote:
>> "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
> 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...
More information about the Lab