Created
December 16, 2023 01:19
-
-
Save jjaychen1e/5da794fe6bbdb83d560f205162ee32c1 to your computer and use it in GitHub Desktop.
JavaScript: Export as PDF pre-processing for ChatGPT Chat in Safari
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
let targetElement = document.evaluate('//*[@id="__next"]/div[1]/div[2]/main/div[2]/div[1]/div/div/div', document, null, XPathResult.ANY_TYPE, null).iterateNext(); | |
if (targetElement) { | |
document.documentElement.appendChild(targetElement); | |
document.body.parentNode.removeChild(document.body); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment