Farfesh.Com Download Links Extractor

Extracts Download Links From Farfesh.Com

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==

// @name          Farfesh.Com Download Links Extractor

// @namespace     DevelopmentSimplyPut(developmentsimplyput.blogspot.com)

// @description   Extracts Download Links From Farfesh.Com

// @include       *farfesh.com/ViewSongs.asp*

// @require        http://code.jquery.com/jquery-latest.min.js

// @version 0.0.1.20141023133757
// ==/UserScript==


jQuery.noConflict();
(function($) {
	setTimeout(function(){ Run(); }, 0);
	
	function Run() {
		var urls = new Array();
		
		$("a[href*='http://www.farfesh.com/MusicPlayer.asp'][href*='SingerID'][href*='albumID'][href*='songID'][href*='MP3File']").each(function(index, value) {
			var oldHref = $(value).attr("href");
			var parts = oldHref.split("MP3File=");
			
			if(typeof(parts) != 'undefined' && null != parts && parts.length > 1) {
				var newHref = ("http://entertainment.farfesh.com/music/arabic/" + parts[1]).replace('/arabic/arabic/', '/arabic/');
				$(value).attr("href", newHref);
				
				urls.push(newHref);
			}
		});
		
		$("<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");
	}
})(jQuery);