Embed Zippyshare from link

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

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

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址