Skip to content

Instantly share code, notes, and snippets.

@chriswbrad
Created January 23, 2017 05:10
Show Gist options
  • Save chriswbrad/afac8a7eb4df67fe2402a733fe403727 to your computer and use it in GitHub Desktop.
Save chriswbrad/afac8a7eb4df67fe2402a733fe403727 to your computer and use it in GitHub Desktop.
Enable easier and faster downloading of statements from Wells Fargo
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