Skip to content

Instantly share code, notes, and snippets.

@acarabott
Last active November 24, 2017 11:36
Show Gist options
  • Save acarabott/b8d410fb3fb5f6a29b529fe08748c79e to your computer and use it in GitHub Desktop.
Save acarabott/b8d410fb3fb5f6a29b529fe08748c79e to your computer and use it in GitHub Desktop.
FreeAgent - Auto click 'Add Attachment' link when reviewing bank statements
Array.from(document.getElementsByClassName('BankTransaction-description')).forEach(link => {
link.addEventListener('click', () => {
setTimeout(() => {
const buttons = Array.from(document.getElementsByClassName('inline_explain_attachment_add_button'));
if (buttons.length > 0) { buttons[0].click(); }
}, 500);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment