slashdot de-hostname

redirect from hostname.slashdot.org to slashdot.org

  1. // ==UserScript==
  2. // @name slashdot de-hostname
  3. // @namespace slashdot
  4. // @description redirect from hostname.slashdot.org to slashdot.org
  5. // @include https://*.slashdot.org/*
  6. // @exclude https://slashdot.org/*
  7. // @version 0.1a
  8. // @grant none
  9. // @run-at document-start
  10. // ==/UserScript==
  11.  
  12. var loc = window.location.href;
  13. loc = loc.substring(loc.indexOf('//') + 1, loc.length);
  14. window.location.href = "https://" + loc.substring(loc.indexOf('.') + 1, loc.length);