instapaper显示公众号防盗链图片

Load original image of wechat artical on instapaper

// ==UserScript==
// @name         instapaper显示公众号防盗链图片
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Load original image of wechat artical on instapaper
// @author       https://github.com/techmovie
// @match        https://www.instapaper.com/read/*
// @match        https://www.instapaper.com/u*
// @grant        none
// ==/UserScript==
/* jshint esversion:6 */
(function () {
  showImage()
  function showImage () {
    const imglist = document.querySelectorAll('#story img')
    for (let i = 0; i < imglist.length; i++) {
      const imageSrc = imglist[i].getAttribute('src')
      if (imageSrc) {
        if (imageSrc.includes('mmbiz.qpic.cn')) {
          imglist[i].setAttribute('src', 'http:///localhost:3000?url=' + imageSrc)
        }
      }
    }
  }
})()