-
-
Save JonBons/55f318c4e9f8eab7e7d4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* Vedant Misra (vedantmisra.com) (github.com/vedant) | |
* | |
* Script for exporting Google Keep note files. | |
* | |
* This does not handle attachments or checklists, only note files. Downloads | |
* each note to a .txt file named for the note's title. | |
* | |
* To use this, go to https://drive.google.com/keep/ and wait for the page to | |
* fully load all of your saved notes; scroll to the bottom to confirm they're | |
* loaded. Then paste the below in your URI bar, go to the start of the line, | |
* prepend what you pasted with "javascript:" without quote marks, and hit enter. | |
* | |
* REVISED for Google Keep update. 2014-09-14 | |
*/ | |
(function(){"use strict";var e=document.createElement("SCRIPT");e.src="//code.jquery.com/jquery-latest.min.js";e.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(e);var t=function(e){if(window.jQuery){e(jQuery)}else{window.setTimeout(function(){t(e)},100)}};t(function(e){(function(e){e.save=function(t,n){if(!t){e.error("Console.save: No data");return}if(!n){n="console.txt"}if(typeof t==="object"){t=JSON.stringify(t,undefined,4)}var r=new Blob([t],{type:"text/text"}),i=document.createEvent("MouseEvents"),s=document.createElement("a");s.download=n;s.href=window.URL.createObjectURL(r);s.dataset.downloadurl=["text/text",s.download,s.href].join(":");i.initMouseEvent("click",true,false,window,0,0,0,0,0,false,false,false,false,0,null);s.dispatchEvent(i)}})(console);var t=e(".IZ65Hb-YPqjbf.h1U9Be-YPqjbf"),n=e(".IZ65Hb-YPqjbf.r4nke-YPqjbf");for(var r=1;r<=t.length;r++){t[r].click();var i=e('.IZ65Hb-YPqjbf.h1U9Be-YPqjbf[contenteditable="true"');console.save(i[1].innerText,n[r].innerHTML+".txt")}alert(t.length-1+" files downloaded.")})})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment