// ==UserScript== // @name Save ChatGPT as PDF // @namespace http://tampermonkey.net/ // @version 1.10 // @description Turn your chats into neatly formatted PDF. // @author PDFCrowd (https://pdfcrowd.com/) // @match https://chatgpt.com/* // @icon64 https://github.com/pdfcrowd/save-chatgpt-as-pdf/raw/master/icons/icon64.png // @run-at document-end // @grant GM_xmlhttpRequest // @connect api.pdfcrowd.com // @license MIT // @downloadURL none // ==/UserScript== /* globals pdfcrowdChatGPT */ // do not modify or delete the following line, it serves as a placeholder for // the common.js contents which is copied here by "make build-userscript-single-file" // // common.js placeholder 'use strict'; const pdfcrowdChatGPT = {}; pdfcrowdChatGPT.pdfcrowdAPI = 'https://api.pdfcrowd.com/convert/24.04/'; pdfcrowdChatGPT.username = 'chat-gpt'; pdfcrowdChatGPT.apiKey = '29d211b1f6924c22b7a799b4e8fecb7e'; pdfcrowdChatGPT.init = function() { if(document.querySelectorAll('.pdfcrowd-convert').length > 0) { // avoid double init return; } // remote images live at least 1 minute const minImageDuration = 60000; const buttonIconFill = (typeof GM_xmlhttpRequest !== 'undefined') ? '#A72C16' : '#EA4C3A'; var rateUsLink = '#'; if (typeof GM_info !== 'undefined') { rateUsLink = 'https://greasyfork.org/en/scripts/484463-save-chatgpt-as-pdf/feedback#post-discussion'; } else if (navigator.userAgent.includes("Chrome")) { rateUsLink = 'https://chromewebstore.google.com/detail/save-chatgpt-as-pdf/ccjfggejcoobknjolglgmfhoeneafhhm/reviews'; } else if (navigator.userAgent.includes("Firefox")) { rateUsLink = 'https://addons.mozilla.org/en-US/firefox/addon/save-chatgpt-as-pdf/reviews/'; } const pdfcrowdBlockHtml = `