Facebook Auto "Most Recent" Stories

Change Facebook feed to "Most Recent" Stories

目前为 2019-04-21 提交的版本。查看 最新版本

// ==UserScript==
// @name        Facebook Auto "Most Recent" Stories
// @version     0.1555882250
// @author      Hélder Ferreira
// @namespace   https://gf.qytechs.cn/users/89591
// @homepageURL https://gf.qytechs.cn/en/scripts/382099-facebook-auto-most-recent-stories
// @description Change Facebook feed to "Most Recent" Stories
// @compatible  chrome
// @compatible  firefox
// @compatible  opera
// @compatible  safari
// @license     MIT License <https://opensource.org/licenses/MIT>
// @icon        http://i.imgur.com/WpjyLA4.png
// @match       *://*.facebook.com/*
// @grant       none
// ==/UserScript==

(function(){ var arr = [
        "",
        "var cur = window.location.href, org = window.location.origin + \"/\", fd = org + \"?sk=h_chr\", elm = document.querySelectorAll(\"[data-click='bluebar_logo'] > a, ._3qcu > a\"), idx = [\"?sk=h_nor\", \"?ref=logo\", \"?sk=nf\", \"?ref=tn_tnmn\"];",
        "if(cur === org){",
            "window.location.replace(fd);",
        "}",
        "idx.forEach(function(a){",
            "if(cur.indexOf(a) !== -1){",
                "window.location.replace(fd);",
            "}",
        "});",
        "elm.forEach(function(a){",
            "a.setAttribute(\"href\", fd);",
        "});",
        "",
    ].join("\n");
    var he = document.querySelectorAll("head");
    var js = document.createElement("script");
    js.type = "text/javascript";
    js.appendChild(document.createTextNode(arr));
    he[0].appendChild(js);
})();

QingJ © 2025

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