Show All Kompas.com

Automatically shows all page for Kompas.com.

Version au 03/12/2019. Voir la dernière version.

  1. // ==UserScript==
  2. // @name Show All Kompas.com
  3. // @namespace https://greasyfork.org/en/users/221437
  4. // @version 0.3
  5. // @description Automatically shows all page for Kompas.com.
  6. // @author channelorange
  7. // @match *://*.kompas.com/*
  8. // @match *://*.tribunnews.com/*
  9. // @match *://*.gridoto.com/*
  10. // @exclude *://www.kompas.com/
  11. // @exclude *://www.tribunnews.com/
  12. // @exclude *://www.gridoto.com/
  13. // @run-at document-start
  14. // @grant none
  15. // @compatible chrome
  16. // @compatible firefox
  17. // ==/UserScript==
  18.  
  19. if (window.location.href.toString().indexOf("?page=all") != -1) return false;
  20.  
  21. var pathLama = window.location.pathname;
  22. if (!/\?page=all$/.test(pathLama)) {
  23. var pathBaru = pathLama + "?page=all";
  24. window.location.replace(pathBaru);
  25. }