Incremental Reading

Read. Recite.

当前为 2018-01-19 提交的版本,查看 最新版本

// ==UserScript==
// @name         Incremental Reading
// @namespace    http://tampermonkey.net/
// @version      0.4.0
// @description  Read. Recite.
// @description:en  Read. Recite.
// @author       Feng Ya
// @match        https://www.instapaper.com/read/*
// @grant        GM_addStyle
// ==/UserScript==

(function() {
  'use strict';

  // Your code here...

  GM_addStyle('.mask {background-color: black !important;}');

  let cntClick = 0;

  $('body').click(function(event) {
    cntClick++;
    setTimeout(function() {
      if (cntClick === 1) {
        $('.highlight').toggleClass('mask');
      }
      cntClick = 0;
    }, 200);
  });

  $('body').keyup(function(event) {
    // disable during input
    if ($('div.ipnote-popover.showing').length > 0) return;

    // key: h (72)
    if (event.which === 72) {
      $('.highlight').toggleClass('mask');
    }
  });
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址