Skip to content

Instantly share code, notes, and snippets.

@alexargo
Created May 5, 2015 16:50
Show Gist options
  • Save alexargo/72ca5ae3f804caf9faaa to your computer and use it in GitHub Desktop.
Save alexargo/72ca5ae3f804caf9faaa to your computer and use it in GitHub Desktop.
Bookmarklet to replace things in Quickbooks online
javascript:(function(){ var customerMessage = document.getElementsByClassName("customerMessage")[0]; var payeeMessage = document.getElementsByClassName("memoText")[0]; var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; var date = new Date(); date.setDate(1); date.setMonth(date.getMonth()-1); customerMessage.value = customerMessage.value.replace("<Month>",monthNames[date.getMonth()]); customerMessage.value = customerMessage.value.replace("<Year>",date.getFullYear()); payeeMessage.value = payeeMessage.value.replace("<Month>",monthNames[date.getMonth()]); payeeMessage.value = payeeMessage.value.replace("<Year>",date.getFullYear())})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment