Skip to content

Instantly share code, notes, and snippets.

@dsect
Last active September 6, 2022 22:18
Show Gist options
  • Select an option

  • Save dsect/55d42cc3d952d38bf7c6537767de8cf7 to your computer and use it in GitHub Desktop.

Select an option

Save dsect/55d42cc3d952d38bf7c6537767de8cf7 to your computer and use it in GitHub Desktop.
TamperMonkey script for clipping ShopRite.com online coupons
// ==UserScript==
// @name coupons.shoprite.com
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://shop-rite-web-prod.azurewebsites.net/
// @grant none
// @require http://code.jquery.com/jquery-3.3.1.min.js
// ==/UserScript==
var $ = window.jQuery;
$(document).ready(function () {
setTimeout(function () { clipCoupons(); }, 6000);
function clipCoupons() {
$(".available-to-clip").each(function (i, obj) {
//console.log(i, obj);
$(this)[0].click()
// if (!$(this).hasClass("ng-hide")){
// angular.element(this).triggerHandler('click');
// console.log($(this).hasClass("ng-hide"));
// }
//else {
// console.log('Hidden!');
//}
});
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment