Facebook - Force Most Recent

Always set news feed to 'Most Recent'.

当前为 2018-12-24 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Facebook - Force Most Recent
  3. // @namespace https://greasyfork.org/users/222319
  4. // @version 1.0.0
  5. // @date 2018-12-24
  6. // @description Always set news feed to 'Most Recent'.
  7. // @author Explisam <explisam@gmail.com>
  8. // @compatible chrome
  9. // @compatible firefox
  10. // @compatible opera
  11. // @compatible safari
  12. // @license MIT License <https://opensource.org/licenses/MIT>
  13. // @include *://www.facebook.com/
  14. // @include *://www.facebook.com/?*
  15. // @run-at document-start
  16. // ==/UserScript==
  17.  
  18. (function() {
  19. 'use strict';
  20. var url_string = window.location.href;
  21. var url = new URL(url_string);
  22. var sk = url.searchParams.get("sk");
  23.  
  24. if (sk !== "h_chr") {
  25. window.location.replace("https://www.facebook.com/?sk=h_chr");
  26. }
  27. })();