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'); |