Friday, November 20, 2015

Updated Clip All function for Publix Digital Coupons

Over a year ago, I provided the Clip All function for Publix Digital Coupons.  It's been working well and I've received plenty of positive feedback for it.

This month, Publix revised their digital coupon site and the function stopped working.  I have fixed my code and it should work again!  There are a few things to point out though.

First, the method I used in the past for attaching my JavaScript code to their site no longer works.  When I do that, it causes the page to re-load itself, which then negates the addition of my code.  I now load the code and invoke the function from within the bookmarklet.  That works out fine, but that method no longer allows me to re-direct you to the coupon site if you're not currently there.  So you need to invoke the code from the coupon site.

Second, the no longer have links to more pages of coupons, but load more dynamically as you scroll down the page.  I try to make the code emulate the scrolling activity to automatically load more coupons, but it doesn't always trigger the event to load more coupons.  So, if you're sitting on the bottom of the page with all the coupons 'clipped', try to scroll up and down a little to see if more coupons start loading.  If more load, the auto-clipping function should kick back into action.

Please go to https://pothoven.net/PublixClipper.html for installation instructions, and please drop me a comment here if you try it out to let me know how it works for you.

11 comments:

Steve Markey said...

I've been using the Publix Clip All function for quite a while and I think it's great. Unfortunately, it doesn't seem to be working anymore (Dec. 2016). Any chance you could give it another look and see if it can be fixed? Thanks!

Steven Pothoven said...

I noticed that a couple days ago myself, I'll take a look.

Steven Pothoven said...

They've added a check to ensure that the click event is a "trusted" event (ie. not generated by a script). I'll see if I can get around that.

WeeRamekin said...

Hey Steven, just following up to see if you were able to get it working again? I had the same issue as Steve. Really appreciate this tool you've provided!

WeeRamekin said...

Hey Steven, just following up to see if you were able to get it working again? I had the same issue as Steve. Really appreciate this tool you've provided!

Steven Pothoven said...

Well, I could make it work again if I tweaked the code in the middle of it processing my simulated clicks, but that's not a practical solution since you have to catch the event and inject the code in the middle of it. The function to check to see if the button click event is trusted is scoped (embedded) within the click processing code itself, so I haven't found a way to swap out the checking code with new code in a way it can be used to make this work.

The 'isTrusted' attribute of the click event itself is read-only (immutable) so I can't force it to be true. I also tried to clone the click event after it was trigger with a new copy I could change the 'isTrusted' attribute to true in, but then it is no longer recognized as a click event.

I'll keep thinking about it and trying things, but they obviously don't want people to be able to do this for some reason. I just thought it was a feature they neglected to include, but now it appears to be an intentional omission which they are deliberately blocking.

WeeRamekin said...

Thank you Steven for giving it a try. It was a great tool while it lasted, hopefully Publix will one day add this to their availability.

Cory May said...

I'm looking forward to an update on this too. Thanks for trying to fix it! :-)

Boscoe777 said...

Same issues with it not working (2/15/17). I asked a clerk at the store & she said the Publix mobile app has a clip all button. I didn't find that to be the case. In any event , thank you for the Publix tool. Hopefully their website will get it together to add that function.

Monica Siska said...

is there a clip all function for DOLLAR GENERAL?

CandaceDietrich907 Dietrich said...

also looking for dollar general clip all