By default feedly.com uses own thumb generator service. This script disables it
当前为
// ==UserScript==
// @name Disable image resize in Feedly
// @description By default feedly.com uses own thumb generator service. This script disables it
// @namespace zcarot
// @match *://*.feedly.com/*
// @version 1.1
// @grant GM_addStyle
// ==/UserScript==
/*jslint browser:true */
(function () {
'use strict';
var wait = function () {
var divs = document.querySelectorAll('div.u5EntryAnnotationHolder, div.u4EntryAnnotationHolder, div.topRecommendedEntry'),
imgs = document.querySelectorAll('div.content img');
[].forEach.call(divs, function (div) {
var preview = div.childNodes[1],
style,
src;
if (!(preview.getAttribute('data-fetched'))) {
preview.setAttribute('data-fetched', 1);
style = preview.currentStyle || window.getComputedStyle(preview, false);
if (style.backgroundImage) {
src = /url=([^&]+)/.exec(style.backgroundImage);
if (src && src[1]) {
preview.style.backgroundImage = 'url(' + decodeURIComponent(src[1]) + ')';
}
}
}
});
[].forEach.call(imgs, function (image) {
if (!(image.getAttribute('data-fetched'))) {
image.setAttribute('data-fetched', 1);
var src = image.getAttribute('data-original');
if (src) {
image.src = src;
}
}
});
setTimeout(wait, 200);
};
wait();
}());