Redirect book title links in DeVry's Books24x7 RSS feeds

The book title links in the RSS feeds don't work anymore -- this will redirect them so they do.

  1. // ==UserScript==
  2. // @name Redirect book title links in DeVry's Books24x7 RSS feeds
  3. // @namespace https://greasyfork.org/users/130-joshg253
  4. // @description The book title links in the RSS feeds don't work anymore -- this will redirect them so they do.
  5. // @include http://*.*
  6. // @include https://*.*
  7. // @exclude http://devry.skillport.com/*
  8. // @exclude https://devry.skillport.com/*
  9. // @version 1a
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. document.body.addEventListener('click', function (e) {
  14. var targ = e.target || e.srcElement;
  15. if (targ && targ.href && targ.href.match('https?://devry.skillport.com')) {
  16. targ.href = targ.href.replace('https://devry.skillport.com/skillportfe/main.action?assetid=$%7BBookID%7D', 'http://skillport.books24x7.com/toc.aspx?bkid=');
  17. }
  18. });