Forbes - Skip Welcome Screen

Skips the welcome screen; The one with the "Thought of the Day" and the full page ad. Pretty much simulates clicking the link, "Skip this welcome screen", as soon as the welcome screen loads.

  1. // ==UserScript==
  2. // @name Forbes - Skip Welcome Screen
  3. // @namespace https://greasyfork.org/users/2329-killerbadger
  4. // @description Skips the welcome screen; The one with the "Thought of the Day" and the full page ad. Pretty much simulates clicking the link, "Skip this welcome screen", as soon as the welcome screen loads.
  5. // @author KillerBadger
  6. // @version 0.05 : 15-Sep-2016
  7. // @include http://www.forbes.com/forbes/welcome/*
  8. // ==/UserScript==
  9. /*
  10.  
  11. Credits
  12. ============
  13.  
  14. ============
  15.  
  16.  
  17. History
  18. -------------
  19. 0.05 : 15-Sep-2016 Updated to new redirect page.
  20. 0.04 : 05-Oct-2015 Added setTimeout to click, in case the script runs too early.
  21. 0.03 : 12-Oct-2014 Changed script to work
  22. 0.02 : 24-Sep-2008 Added @namespace
  23. 0.01 : 03-Jul-2008 Initial release
  24. ============
  25.  
  26. Known Issues
  27. -------------
  28. Fanboy's Enhanced Tracking List breaks the Forbes welcome page.
  29. Users of that list should add the following exceptionrule (ABP Options > Add your own filters):
  30. @@||images.forbes.com/scripts/omniture/*
  31. ============
  32.  
  33. Unnecessary Comments
  34. -------------
  35. I go to the site quite often and after so many days of seeing the welcome screen, I had to put something together. Grr!
  36. ============
  37. */
  38. url = document.URL;
  39. newURL = extractURL(url,"toURL=","&refURL");
  40. redirect(newURL);
  41.  
  42. function redirect(nLoc) {
  43. document.title = 'Redirecting...';
  44. window.location.replace(nLoc);
  45. }
  46. function extractURL(rawElement, startString, endString) {
  47. b = String(rawElement);
  48. newLoc = b.substring(b.indexOf(startString)+startString.length,b.indexOf(endString));
  49. return newLoc;
  50. }