Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 9th, 2012  |  syntax: None  |  size: 4.03 KB  |  views: 84  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. (function(){function a(e){if(!d[e]){var f=d[e]={exports:{}};c[e].call(f.exports,b,f,a)}return d[e].exports}var b=this,c=a.modules=[],d=a.cache=[];c[0]=function(a,b,c){function d(a){u(a)&&(a=document.getElementById(a));if(!!a){if(arguments.length>1){var b=arguments[1],c=arguments[2]||{};a.src=B+"?url="+b+"&"+g(c)}var d=j(p(a));if(d&&d.instance)return d.instance;var e=E.indexOf(p(a))>-1,f=new G(a);D.push(new F(f,a,e));return f}}function e(a){var b,c,d,e;try{c=JSON.parse(a.data)}catch(g){}b=j(a.source),d=c.method,e=c.value,d===A.READY&&(b?(b.isReady=!0,f(b,C),m(C,b)):E.push(a.source));if(!b||a.origin!==b.domain)return!1;var h=[];e!==undefined&&h.push(e),f(b,d,h)}function f(a,b,c){var d,e,f=a.callbacks[b]||[];for(d=0,e=f.length;d<e;d++)f[d].apply(a.instance,c);if(s(b)||b===A.READY)a.callbacks[b]=[]}function g(a){var b,c,d=[];for(b in a)a.hasOwnProperty(b)&&(c=a[b],d.push(b+"="+(b==="start_track"?parseInt(c,10):c?"true":"false")));return d.join("&")}function h(a,b,c){var d,e,f;for(d=0,e=b.length;d<e;d++)f=b[d],a[f]=i(f,c)}function i(a,b){return function(c){var d=t(c),e=k(this),f=!d&&b?c:null,g=d&&!b?c:null;g&&n(a,g,e),l(a,f,e.element);return this}}function j(a){var b;r(function(c){if(p(c.element)===a){b=c;return!1}});return b}function k(a){var b;r(function(c){if(c.instance===a){b=c;return!1}});return b}function l(a,b,c){var d=p(c);if(!d.postMessage)return!1;var e=c.getAttribute("src").split("?")[0],f=JSON.stringify({method:a,value:b});e.substr(0,2)==="//"&&(e=window.location.protocol+e),d.postMessage(f,e)}function m(a,b){var c=!0,d;b.callbacks[a]=[],r(function(b){d=b.callbacks[a]||[];if(d.length){c=!1;return!1}});return c}function n(a,b,c){c.callbacks[a]=c.callbacks[a]||[],c.callbacks[a].push(b)}function o(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(a[c]);return b}function p(a){return a.contentWindow}function q(a){var b="",c,d;a.substr(0,2)==="//"&&(a=window.location.protocol+a);var e=a.split("/");for(c=0,d=e.length;c<d;c++){if(c<3)b+=e[c];else break;c<2&&(b+="/")}return b}function r(a){var b,c,d;for(b=0,c=D.length;b<c;b++){d=a(D[b]);if(d===!1)break}}function s(a){var b=!1,c;for(c in x)if(x.hasOwnProperty(c)&&x[c]===a){b=!0;break}return b}function t(a){return!!(a&&a.constructor&&a.call&&a.apply)}function u(a){return!!(a===""||a&&a.charCodeAt&&a.substr)}var v=this,w=c(1),x=c(2),y=c(3),z=w.bridge,A=w.api,B="http://wt.soundcloud.com/player/",C="__LATE_BINDING__",D=[],E=[],F=function(a,b,c){this.instance=a,this.element=b,this.domain=q(b.getAttribute("src")),this.isReady=!!c,this.callbacks={}},G=function(){},H=G.prototype={load:function(a,b){if(!!a){b=b||{};var c=this,d=k(this),e=d.element,f=e.src,h=f.substr(0,f.indexOf("?"));d.isReady=!1,e.onload=function(){c.bind(A.READY,function(){var a,c=d.callbacks;for(a in c)c.hasOwnProperty(a)&&a!==A.READY&&l(z.ADD_LISTENER,a,d.element);b.callback&&b.callback()})},e.src=h+"?url="+a+"&"+g(b)}},bind:function(a,b){var c=this,d=k(this);d&&d.element&&(a===A.READY&&d.isReady?setTimeout(b,1):d.isReady?(n(a,b,d),l(z.ADD_LISTENER,a,d.element)):n(C,function(){c.bind(a,b)},d));return this},unbind:function(a){var b=k(this);if(b&&b.element){var c=m(a,b);a!==A.READY&&c&&l(z.REMOVE_LISTENER,a,b.element)}}},I=o(x),J=o(y);h(H,I),h(H,J,!0),window.addEventListener?window.addEventListener("message",e,!1):window.attachEvent("onmessage",e),d.Events=A,a.SC=a.SC||{},a.SC.Widget=d},c[1]=function(a,b,c){var d=this;d.api={LOAD_PROGRESS:"loadProgres",PLAY_PROGRESS:"playProgress",PLAY:"play",PAUSE:"pause",FINISH:"finish",SEEK:"seek",READY:"ready",OPEN_SHARE_PANEL:"sharePanelOpened",SHARE:"share",CLICK_DOWNLOAD:"downloadClicked",CLICK_BUY:"buyClicked"},d.bridge={REMOVE_LISTENER:"removeEventListener",ADD_LISTENER:"addEventListener"}},c[2]=function(a,b,c){var d=this;b.exports={GET_VOLUME:"getVolume",GET_DURATION:"getDuration",GET_POSITION:"getPosition",GET_SOUNDS:"getSounds",GET_CURRENT_SOUND:"getCurrentSound",GET_CURRENT_SOUND_INDEX:"getCurrentSoundIndex",IS_PAUSED:"isPaused"}},c[3]=function(a,b,c){var d=this;b.exports={PLAY:"play",PAUSE:"pause",TOGGLE:"toggle",SEEK_TO:"seekTo",SET_VOLUME:"setVolume",NEXT:"next",PREV:"prev",SKIP:"skip"}},a(0)})()