Created
January 23, 2017 05:10
-
-
Save chriswbrad/afac8a7eb4df67fe2402a733fe403727 to your computer and use it in GitHub Desktop.
Enable easier and faster downloading of statements from Wells Fargo
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
Paste into console so statements will download when clicked instead of hijacking the current window. | |
File name will default to 'YYYY-MM-DD' instead of unreadable WF name. | |
This assumes statement titles are of the form "Statement MM/DD/YYYY (XXK, PDF)" | |
$('.page').unbind('click'); | |
$("a[data-pdf='true']").each(function(i,el) { | |
title=$(el).text().trim().replace("Statement ", ''); | |
// Default save as file name: (YYYY-MM-DD) | |
fileName = '20'+title.substr(6,2) + '-' + title.substr(0,2) + '-' + title.substr(3,2); | |
el.setAttribute('download',fileName + '.pdf'); | |
el.setAttribute('href',$(el).attr('data-url')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment