Skip to content

Instantly share code, notes, and snippets.

@arieljatib
Created April 27, 2021 18:37
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arieljatib/1b457d03e77507e3960fe4709ccc0414 to your computer and use it in GitHub Desktop.
Save arieljatib/1b457d03e77507e3960fe4709ccc0414 to your computer and use it in GitHub Desktop.
Exporting notes and highlights from Scribd
// based on code from https://medium.com/@art.stories/scribd-export-notes-workaround-13af221879d6
var annotations = document.querySelector('.annotations');
var notesParagraphs = Array.from(annotations.querySelectorAll('p, span.page_num, strong.annotation_type'));
notesParagraphs.reverse();
var notesText = notesParagraphs.map((paragraph) => `<p>${paragraph.innerHTML}</p>`).join('');
var win = window.open("", "Title", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=200,top="+(screen.height-400)+",left="+(screen.width-840));
win.document.body.innerHTML = `<div>${notesText}</div>`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment