Created
October 18, 2015 18:38
-
-
Save ajeddeloh/395fbcc2322d69b3d7e0 to your computer and use it in GitHub Desktop.
Mint.com user script
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 Cleanup Mint | |
// @namespace mint | |
// @description cleans up shit on mint | |
// @include https://wwws.mint.com/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
console.log('Greasemonkey Start'); | |
var Greasemonkey = function () { | |
console.log('running Greasemonkey Script'); | |
var toBlock = [ | |
'div.AdviceView', | |
'div.AlertsView', | |
'div.CreditScoreView', | |
'div.BillRemindersView', | |
'div.w2sView', | |
'div.TaxesView', | |
'div.GoalsView', | |
'div.InvestmentsView' | |
]; | |
function removeElems() { | |
if (typeof jQuery === 'undefined') { | |
return; | |
} | |
jqObjs = jQuery(toBlock.join(',')); | |
jqObjs.each(function(i, x) { | |
var idx = toBlock.indexOf('div.'+jQuery(this).attr('class')); | |
if (idx == -1) { return; } | |
toBlock.splice(idx, 1); | |
}); | |
jqObjs.remove(); | |
if(toBlock.length == 0) { | |
console.log('Done.') | |
clearInterval(interval); | |
} | |
} | |
var interval = setInterval(removeElems, 100); | |
}(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment