Skip to content

Instantly share code, notes, and snippets.

View chriswbrad's full-sized avatar

Chris Bradfield chriswbrad

View GitHub Profile
@chriswbrad
chriswbrad / Wells Fargo - enable download
Created January 23, 2017 05:10
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');