Sort Facebook NewsFeed by Most Recent

Automatically sorts your news feed by Most Recent instead of by Top Stories.

目前為 2016-04-29 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Sort Facebook NewsFeed by Most Recent
// @version      1.0
// @description  Automatically sorts your news feed by Most Recent instead of by Top Stories.
// @author       Eric Mintz
// @match        https://www.facebook.com/*
// @grant        none
// @run-at document-start
// @namespace https://gf.qytechs.cn/users/7084
// ==/UserScript==

(function() {
    'use strict';

    var addListener = function(){
        document.addEventListener('DOMSubtreeModified',domChangeListener);
    };

    var removeListener = function(){
        // pause the monitor for 10 seconds (less CPU)
        document.removeEventListener('DOMSubtreeModified',domChangeListener);
        setTimout(function(){addListener();},10000);
    };

    var domChangeListener = function() {
        if (document.location.href == 'https://www.facebook.com/') {
            //orderByPostDate;
            document.location.href += '?sk=h_chr';
            removeListener();
        }
    };
    // Start the monitor
    addListener();

})();

QingJ © 2025

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