Feedly Autopreview All Items

Automatically opens the preview slider for all items.

目前为 2014-08-28 提交的版本,查看 最新版本

// ==UserScript==
// @id             FeedlyautopreviewmodMod
// @name           Feedly Autopreview All Items
// @version        1.0.0
// @grant          GM_addStyle
// @description    Automatically opens the preview slider for all items.
// @include        http://feedly.com/*
// @include        https://feedly.com/*
// @run-at         document-end
// @namespace https://greasyfork.org/users/4819
// ==/UserScript==
var autopreviewmod = function () {
	this.initialize.apply(this, arguments);
}
autopreviewmod.prototype = {
	initialize:function () {
	}
	,autopreview:function (item) {
		var itemid = item.id.replace(/^([^=]+).*$/, "$1");
        item.setAttribute("data-page-entry-action", "previewEntry");
	}
};
mo = new MutationObserver(function (mutations) {
	var autopreviewmodObj = new autopreviewmod();
	mutations.forEach(function (mutation) {
		Array.prototype.slice.call(mutation.addedNodes).forEach(function (node) {
			if (node.tagName=="DIV" && (node.className=="u0Entry " || node.className=="u1Entry " || node.className=="u2Entry " || node.className=="u3Entry " || node.className=="u4Entry " || node.className=="u5Entry ")) {
				autopreviewmodObj.autopreview(node);
			};
		});
	});
});
mo.observe(document.getElementById("box"), {childList:true, subtree:true});