Advertisement
PintorKagamine

MediaWiki:Common.js

Sep 8th, 2014
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $('.sc-player').each(function() {
  2.   var soundid     = $(this).data('sc-id');
  3.   var soundwidth  = $(this).data('sc-width') || '100%';
  4.   var soundheight = $(this).data('sc-height') || '450';
  5.   if (soundid) {
  6.     $(this).html('<iframe width="' + soundwidth + '" height="' + soundheight + '" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/' + soundid + '&amp;color=ff5500&amp;auto_play=false&amp;hide_related=false&amp;show_artwork=true"></iframe>');
  7.   } else {
  8.     window.GlobalNotification.show('Este artículo contiene un reproductor de Soundcloud, pero no se ha especificado el archivo.', 'error');
  9.   };
  10. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement