Change Facebook feed to "Most Recent" Stories
当前为
// ==UserScript==
// @name Facebook Auto "Most Recent" Stories
// @version 0.1555874970
// @author Hélder Ferreira
// @namespace https://greasyfork.org/users/89591
// @homepageURL
// @updateURL
// @description Change Facebook feed to "Most Recent" Stories
// @icon http://i.imgur.com/WpjyLA4.png
// @match *://*.facebook.com/*
// @grant none
// ==/UserScript==
/*
Browser support / compatibility:
*Google Chrome 23+
*Firefox 21+
*Microsoft Edge 12+ / Edgium (MS Edge Chromium based) 75+
*Opera 15+
*Safari 6+
*/
(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);
})();