Skip to content

Instantly share code, notes, and snippets.

@ssig33
Last active August 29, 2015 14:06
Show Gist options
  • Save ssig33/196594fa7aacf1ddd8a4 to your computer and use it in GitHub Desktop.
Save ssig33/196594fa7aacf1ddd8a4 to your computer and use it in GitHub Desktop.
Facebook で News Feed を強制的に Most Recent にする画期的な user.js
// ==UserScript==
// @name Facebook Force Most Recent
// @namespace http://use.i.E.your.homepage/
// @version 2.0
// @description enter something useful
// @match https://www.facebook.com/*
// @copyright 2012+, You
// ==/UserScript==
var f = function(){
setTimeout(function(){
if(document.querySelector("#u_0_q")){
document.querySelector("#u_0_q").click();
setTimeout(function(){
if(document.querySelector("#u_0_o > div > ul > li a[aria-selected='true']").innerText.match(/Top/)){
document.querySelector("#u_0_o > div > ul > li:nth-child(2) > a").click();
}else{
document.querySelector("#u_0_q").click();
}
}, 1000);
}else{
f()
}
},200)
}
f();
@ssig33
Copy link
Author

ssig33 commented Sep 23, 2014

言語設定が英語の時のみ動きます、 Chrome + TamperMonkey で動作確認してます。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment