Farfesh.Com Download Links Extractor

Extracts Download Links From Farfesh.Com

  1. // ==UserScript==
  2.  
  3. // @name Farfesh.Com Download Links Extractor
  4.  
  5. // @namespace DevelopmentSimplyPut(developmentsimplyput.blogspot.com)
  6.  
  7. // @description Extracts Download Links From Farfesh.Com
  8.  
  9. // @include *farfesh.com/ViewSongs.asp*
  10.  
  11. // @require http://code.jquery.com/jquery-latest.min.js
  12.  
  13. // @version 0.0.1.20141023133757
  14. // ==/UserScript==
  15.  
  16.  
  17. jQuery.noConflict();
  18. (function($) {
  19. setTimeout(function(){ Run(); }, 0);
  20. function Run() {
  21. var urls = new Array();
  22. $("a[href*='http://www.farfesh.com/MusicPlayer.asp'][href*='SingerID'][href*='albumID'][href*='songID'][href*='MP3File']").each(function(index, value) {
  23. var oldHref = $(value).attr("href");
  24. var parts = oldHref.split("MP3File=");
  25. if(typeof(parts) != 'undefined' && null != parts && parts.length > 1) {
  26. var newHref = ("http://entertainment.farfesh.com/music/arabic/" + parts[1]).replace('/arabic/arabic/', '/arabic/');
  27. $(value).attr("href", newHref);
  28. urls.push(newHref);
  29. }
  30. });
  31. $("<span style='direction:ltr;display:block;width:100%;height:60px;color:blue;background:red;'><textarea cols='100'>" + urls.join('&#13;&#10;') + "</textarea></span><br />").insertBefore("table#main_table");
  32. }
  33. })(jQuery);