Last active
May 2, 2019 08:36
-
-
Save LeonFedotov/1d9bf7a30f0a0ad0b1c755b5bfd0b7dc to your computer and use it in GitHub Desktop.
Bookmarklet: Print to pdf ali express order page with all the info shown and filename set to "order id - price"
This file contains 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
// The way I used it is to open all my orders one by one from the order page | |
// and then start clicking on this bookmarklet starting from the first order tab | |
// the bookmarklet changes the title and shows the finance tab | |
// then launches the print dialog and closes the tab. | |
javascript:(function () { | |
document.title = `${window.location.search.split('=').pop()} - ${document.getElementsByClassName('final-price').item(2).innerText}`; | |
document.getElementById('fund-pnl').style.display = 'block'; | |
document.getElementById('operate-pnl').style.display = 'block'; | |
window.print(); | |
window.close() | |
}()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment