Last active
September 6, 2016 18:22
-
-
Save yrps/3ff25127428ae0d4a83087656784ac14 to your computer and use it in GitHub Desktop.
greasemonkey: Stay logged in to the card account page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name citidirect session extender | |
// @namespace https://github.com/ncoop | |
// @description Stay logged in to the card account page | |
// @homepageURL https://gist.github.com/ncoop/3ff25127428ae0d4a83087656784ac14 | |
// @include https://home.cards.citidirect.com/CommercialCard/* | |
// @icon https://gist.github.com/ncoop/3ff25127428ae0d4a83087656784ac14/raw/9b072f92411cf2ef25d41dd75be340052162779c/svg-citi.png | |
// @version 0.1.0 | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
"use strict"; | |
var intervalMinutes = 10; | |
var intvId = setInterval(function() { | |
var anchor = document.querySelector('.gwt-MainBtnRed a') | |
if (anchor) { | |
console.log(Date() + " Clicking anchor."); | |
anchor.click(); | |
} else { | |
console log(Date() + " Anchor not found."); | |
} | |
}, intervalMinutes * 60 * 1000); | |
console.log("Session refresh ID: " + intvId); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment