您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hide the read items list when you have finished reading unread items.
当前为
// ==UserScript== // @name Feedly Hide Read Items When Done // @version 1.1.4 // @namespace geekrunner // @include *cloud.feedly.com/* // @include *feedly.com/* // @description Hide the read items list when you have finished reading unread items. // ==/UserScript== // VERSION HISTORY // 1.1.4 - Updated magic string from "No unread articles" to "No unread stories". // 1.1.3 - Reference one fewer element from DOM in hopes of having less DOM-based bugs. // 1.1.2 - Fix for Feedly's update to DOM. // 1.1.1 - Fix issue where the page refreshes while you're still reading the last article. // 1.1 - Fix for updated version of feedly. // 1.0 - Initial Release. (function() { console.debug("[FHRIWD] - running"); var tweakXHR = function () { console.debug("[FHRIWD] Customizing XMLHttpRequest."); try { XMLHttpRequest.prototype.open_old = XMLHttpRequest.prototype.open; XMLHttpRequest.prototype.open = function (method, url, async, user, pass) { this.addEventListener("readystatechange", function() { try { var unreadCountSpan = document.querySelector("#feedlyTitleBar span.categoryUnreadCountHint"); if (unreadCountSpan == null) { console.info("[FHRIWD] Could not find unread count message - doing nothing."); } else if (unreadCountSpan.textContent.trim()=="No unread stories") { if (document.getElementsByClassName("selectedEntry").length == 0) { //Don't hide when still reading the last article. console.info("[FHRIWD] All items read - hiding timeline."); document.getElementById("timeline").style.display = "none"; document.getElementById("noUpdatesMessage").style.display = "block"; } } } catch (e) { console.error("[FHRIWD] " + e.message); } }, false); this.open_old.call(this, method, url, async, user, pass); }; } catch (e) { console.error("[FHRIWD] " + e.message); } console.debug("[FHRIWD] Finished customizing XMLHttpRequest."); }; //Inject the script into the page. var script = document.createElement('script'); script.setAttribute('type','application/javascript'); script.textContent = '(' + tweakXHR + ')();'; document.body.appendChild(script); //run the script document.body.removeChild(script); //cleanup console.debug("[FHRIWD] - complete"); }());
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址