Embed Zippyshare from link

find link to songs from zippyshare and automatically embeds into the page

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name           Embed Zippyshare from link
// @namespace      my
// @description    find link to songs from zippyshare and automatically embeds into the page
// @include        *torrentsmd.*/forum.php*
// @require        http://code.jquery.com/jquery-2.1.3.js
// @version        1.3
// @grant          none
// ==/UserScript==
/*jshint multistr: true */
$.noConflict();
jQuery( document ).ready(function( $ ) {
var regex = /^.+?\/\/www([0-9]+)\.zippyshare\.com\/v\/([a-zA-Z0-9]+)\/[a-zA-Z0-9]+\.[a-zA-Z0-9]+/;
var soundcloud = $("a").filter(function() {
    var m = regex.exec(this.href);
    if (m) {
       this.setAttribute('serverID', m[1]);
       this.setAttribute('fileID', m[2]);
       return true;
    }
});
soundcloud.each(function(){ 
    $(this).after('<embed flashvars="baseurl=https://api.zippyshare.com/api/&amp;file=' + this.getAttribute('fileID') +
                  '&amp;server=' + this.getAttribute('serverID') + '" allowfullscreen="false" quality="high"\
                   wmode="transparent" src="https://api.zippyshare.com/api/player.swf" type="application/x-shockwave-flash"\
                   height="80" width="700" style="display:block">');
});
    });