Instapaper Reading Time

Prints item count and total time of current item list in title

  1. // ==UserScript==
  2. // @name Instapaper Reading Time
  3. // @namespace hghwng
  4. // @match *://*.instapaper.com/*
  5. // @grant none
  6. // @description Prints item count and total time of current item list in title
  7. // @version 0.0.1.20250213111519
  8. // ==/UserScript==
  9.  
  10.  
  11. (function() {
  12. var items = Array.from(document.querySelectorAll('.title_meta .read_time'));
  13. var minutes = items.map(x => parseInt(x.innerHTML.match(/(\d+) min/)[1]));
  14. var total = minutes.reduce((x, y) => (x + y));
  15. document.title += `: ${items.length} items in ${total} min`;
  16. })();