Skip to content

Instantly share code, notes, and snippets.

@julians
julians / ExportKindle.js
Last active August 3, 2020 20:56 — forked from jkubecki/ExportKindle.js
Amazon Kindle Export
/*
The following data should be run in the console while viewing the page https://read.amazon.com/
It will export a CSV file called "download" which can (and should) be renamed with a .csv extension
modified version of the original script: https://gist.github.com/jkubecki/d61d3e953ed5c8379075b5ddd8a95f22
changes:
* adds a column indicating samples (EBSP)
* updates the database version
* escapes double quotes instead of stripping them
*/
// Usage: $(element).scrollToTop([position])
;(function($){
// only allow one scroll to top operation to be in progress at a time,
// which is probably what you want
var scrollToTopInProgress = false
$.fn.scrollToTop = function(position){
var $this = this,
targetY = position || 0,