TorrensMD Link Corector

Corectare URL extern

当前为 2015-06-08 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name TorrensMD Link Corector
  3. // @description Corectare URL extern
  4. // @include *torrentsmd.*
  5. // @include *torrentsmoldova.*
  6. // @version 0.1
  7. // @namespace https://greasyfork.org/users/3718
  8. // ==/UserScript==
  9.  
  10. (function ($) {
  11. var hostname = window.location.hostname;
  12.  
  13. $('a[href*="torrentsmd"], a[href*="torrentsmoldova"]').each(function() {
  14. var curhr = $(this).attr('href');
  15. $(this).attr('href',
  16. curhr.replace($(this).prop('hostname'), hostname)
  17. );
  18. });
  19.  
  20. })(jQuery);