From 7832b96455d1ed5fe7b60e004b74c011d9db5cda Mon Sep 17 00:00:00 2001 From: pendo324 Date: Fri, 12 Jun 2015 03:53:02 -0400 Subject: [PATCH] Re-minified js --- OBS Now Playing/nowplaying.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OBS Now Playing/nowplaying.min.js b/OBS Now Playing/nowplaying.min.js index 5cd9839..4907c2f 100644 --- a/OBS Now Playing/nowplaying.min.js +++ b/OBS Now Playing/nowplaying.min.js @@ -1 +1 @@ -var requirejs,require,define;!function(ba){function G(e){return"[object Function]"===K.call(e)}function H(e){return"[object Array]"===K.call(e)}function v(e,t){if(e){var i;for(i=0;i-1&&(!e[i]||!t(e[i],i,e));i-=1);}}function t(e,t){return fa.call(e,t)}function m(e,i){return t(e,i)&&e[i]}function B(e,i){for(var n in e)if(t(e,n)&&i(e[n],n))break}function U(e,i,n,r){return i&&B(i,function(i,o){(n||!t(e,o))&&(!r||"object"!=typeof i||!i||H(i)||G(i)||i instanceof RegExp?e[o]=i:(e[o]||(e[o]={}),U(e[o],i,n,r)))}),e}function u(e,t){return function(){return t.apply(e,arguments)}}function ca(e){throw e}function da(e){if(!e)return e;var t=ba;return v(e.split("."),function(e){t=t[e]}),t}function C(e,t,i,n){return t=Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e),t.requireType=e,t.requireModules=n,i&&(t.originalError=i),t}function ga(e){function i(e,t,i){var n,r,o,a,s,u,d,l,t=t&&t.split("/"),c=P.map,p=c&&c["*"];if(e){for(e=e.split("/"),r=e.length-1,P.nodeIdCompat&&Q.test(e[r])&&(e[r]=e[r].replace(Q,"")),"."===e[0].charAt(0)&&t&&(r=t.slice(0,t.length-1),e=r.concat(e)),r=e,o=0;o0&&(r.splice(o-1,2),o-=2);e=e.join("/")}if(i&&c&&(t||p)){r=e.split("/"),o=r.length;e:for(;o>0;o-=1){if(s=r.slice(0,o).join("/"),t)for(a=t.length;a>0;a-=1)if((i=m(c,t.slice(0,a).join("/")))&&(i=m(i,s))){n=i,u=o;break e}!d&&p&&m(p,s)&&(d=m(p,s),l=o)}!n&&d&&(n=d,u=l),n&&(r.splice(0,u,n),e=r.join("/"))}return(n=m(P.pkgs,e))?n:e}function n(e){z&&v(document.getElementsByTagName("script"),function(t){return t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===E.contextName?(t.parentNode.removeChild(t),!0):void 0})}function r(e){var t=m(P.paths,e);return t&&H(t)&&1-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function a(e,t,n,r){var a,s,u=null,d=t?t.name:null,l=e,c=!0,p="";return e||(c=!1,e="_@r"+(I+=1)),e=o(e),u=e[0],e=e[1],u&&(u=i(u,d,r),s=m(O,u)),e&&(u?p=s&&s.normalize?s.normalize(e,function(e){return i(e,d,r)}):-1===e.indexOf("!")?i(e,d,r):e:(p=i(e,d,r),e=o(p),u=e[0],p=e[1],n=!0,a=E.nameToUrl(p))),n=!u||s||n?"":"_unnormalized"+(J+=1),{prefix:u,name:p,parentMap:t,unnormalized:!!n,url:a,originalName:l,isDefine:c,id:(u?u+"!"+p:p)+n}}function s(e){var t=e.id,i=m(j,t);return i||(i=j[t]=new E.Module(e)),i}function d(e,i,n){var r=e.id,o=m(j,r);!t(O,r)||o&&!o.defineEmitComplete?(o=s(e),o.error&&"error"===i?n(o.error):o.on(i,n)):"defined"===i&&n(O[r])}function l(e,t){var i=e.requireModules,n=!1;t?t(e):(v(i,function(t){(t=m(j,t))&&(t.error=e,t.events.error&&(n=!0,t.emit("error",e)))}),n||g.onError(e))}function c(){R.length&&(ha.apply(L,[L.length,0].concat(R)),R=[])}function p(e){delete j[e],delete D[e]}function f(e,t,i){var n=e.map.id;e.error?e.emit("error",e.error):(t[n]=!0,v(e.depMaps,function(n,r){var o=n.id,a=m(j,o);a&&!e.depMatched[r]&&!i[o]&&(m(t,o)?(e.defineDep(r,O[o]),e.check()):f(a,t,i))}),i[n]=!0)}function h(){var e,t,i=(e=1e3*P.waitSeconds)&&E.startTime+e<(new Date).getTime(),o=[],a=[],s=!1,u=!0;if(!q){if(q=!0,B(D,function(e){var d=e.map,l=d.id;if(e.enabled&&(d.isDefine||a.push(e),!e.error))if(!e.inited&&i)r(l)?s=t=!0:(o.push(l),n(l));else if(!e.inited&&e.fetched&&d.isDefine&&(s=!0,!d.prefix))return u=!1}),i&&o.length)return e=C("timeout","Load timeout for modules: "+o,null,o),e.contextName=E.contextName,l(e);u&&v(a,function(e){f(e,{},{})}),i&&!t||!s||!z&&!ea||S||(S=setTimeout(function(){S=0,h()},50)),q=!1}}function y(e){t(O,e[0])||s(a(e[0],null,!0)).init(e[1],e[2])}function x(e){var e=e.currentTarget||e.srcElement,t=E.onScriptLoad;return e.detachEvent&&!Y?e.detachEvent("onreadystatechange",t):e.removeEventListener("load",t,!1),t=E.onScriptError,(!e.detachEvent||Y)&&e.removeEventListener("error",t,!1),{node:e,id:e&&e.getAttribute("data-requiremodule")}}function b(){var e;for(c();L.length;){if(e=L.shift(),null===e[0])return l(C("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));y(e)}}var q,w,E,k,S,P={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},j={},D={},A={},L=[],O={},F={},_={},I=1,J=1;return k={require:function(e){return e.require?e.require:e.require=E.makeRequire(e.map)},exports:function(e){return e.usingExports=!0,e.map.isDefine?e.exports?O[e.map.id]=e.exports:e.exports=O[e.map.id]={}:void 0},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return m(P.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},w=function(e){this.events=m(A,e.id)||{},this.map=e,this.shim=m(P.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},w.prototype={init:function(e,t,i,n){n=n||{},this.inited||(this.factory=t,i?this.on("error",i):this.events.error&&(i=u(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.errback=i,this.inited=!0,this.ignore=n.ignore,n.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,E.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();E.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],u(this,function(){return e.prefix?this.callPlugin():this.load()}))}},load:function(){var e=this.map.url;F[e]||(F[e]=!0,E.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,i=this.map.id;t=this.depExports;var n=this.exports,r=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,1>this.depCount&&!this.defined){if(G(r)){if(this.events.error&&this.map.isDefine||g.onError!==ca)try{n=E.execCb(i,r,t,n)}catch(o){e=o}else n=E.execCb(i,r,t,n);if(this.map.isDefine&&void 0===n&&((t=this.module)?n=t.exports:this.usingExports&&(n=this.exports)),e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",l(this.error=e)}else n=r;this.exports=n,this.map.isDefine&&!this.ignore&&(O[i]=n,g.onResourceLoad)&&g.onResourceLoad(E,this.map,this.depMaps),p(i),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var e=this.map,n=e.id,r=a(e.prefix);this.depMaps.push(r),d(r,"defined",u(this,function(r){var o,c;c=m(_,this.map.id);var f=this.map.name,h=this.map.parentMap?this.map.parentMap.name:null,v=E.makeRequire(e.parentMap,{enableBuildCallback:!0});this.map.unnormalized?(r.normalize&&(f=r.normalize(f,function(e){return i(e,h,!0)})||""),r=a(e.prefix+"!"+f,this.map.parentMap),d(r,"defined",u(this,function(e){this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),(c=m(j,r.id))&&(this.depMaps.push(r),this.events.error&&c.on("error",u(this,function(e){this.emit("error",e)})),c.enable())):c?(this.map.url=E.nameToUrl(c),this.load()):(o=u(this,function(e){this.init([],function(){return e},null,{enabled:!0})}),o.error=u(this,function(e){this.inited=!0,this.error=e,e.requireModules=[n],B(j,function(e){0===e.map.id.indexOf(n+"_unnormalized")&&p(e.map.id)}),l(e)}),o.fromText=u(this,function(i,r){var u=e.name,d=a(u),c=M;r&&(i=r),c&&(M=!1),s(d),t(P.config,n)&&(P.config[u]=P.config[n]);try{g.exec(i)}catch(p){return l(C("fromtexteval","fromText eval for "+n+" failed: "+p,p,[n]))}c&&(M=!0),this.depMaps.push(d),E.completeLoad(u),v([u],o)}),r.load(e.name,v,o,P))})),E.enable(r,this),this.pluginMaps[r.id]=r},enable:function(){D[this.map.id]=this,this.enabling=this.enabled=!0,v(this.depMaps,u(this,function(e,i){var n,r;if("string"==typeof e){if(e=a(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[i]=e,n=m(k,e.id))return void(this.depExports[i]=n(this));this.depCount+=1,d(e,"defined",u(this,function(e){this.undefed||(this.defineDep(i,e),this.check())})),this.errback?d(e,"error",u(this,this.errback)):this.events.error&&d(e,"error",u(this,function(e){this.emit("error",e)}))}n=e.id,r=j[n],!t(k,n)&&r&&!r.enabled&&E.enable(e,this)})),B(this.pluginMaps,u(this,function(e){var t=m(j,e.id);t&&!t.enabled&&E.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var i=this.events[e];i||(i=this.events[e]=[]),i.push(t)},emit:function(e,t){v(this.events[e],function(e){e(t)}),"error"===e&&delete this.events[e]}},E={config:P,contextName:e,registry:j,defined:O,urlFetched:F,defQueue:L,Module:w,makeModuleMap:a,nextTick:g.nextTick,onError:l,configure:function(e){e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/");var t=P.shim,i={paths:!0,bundles:!0,config:!0,map:!0};B(e,function(e,t){i[t]?(P[t]||(P[t]={}),U(P[t],e,!0,!0)):P[t]=e}),e.bundles&&B(e.bundles,function(e,t){v(e,function(e){e!==t&&(_[e]=t)})}),e.shim&&(B(e.shim,function(e,i){H(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=E.makeShimExports(e)),t[i]=e}),P.shim=t),e.packages&&v(e.packages,function(e){var t,e="string"==typeof e?{name:e}:e;t=e.name,e.location&&(P.paths[t]=e.location),P.pkgs[t]=e.name+"/"+(e.main||"main").replace(ia,"").replace(Q,"")}),B(j,function(e,t){!e.inited&&!e.map.unnormalized&&(e.map=a(t,null,!0))}),(e.deps||e.callback)&&E.require(e.deps||[],e.callback)},makeShimExports:function(e){return function(){var t;return e.init&&(t=e.init.apply(ba,arguments)),t||e.exports&&da(e.exports)}},makeRequire:function(r,o){function u(i,n,d){var c,p;return o.enableBuildCallback&&n&&G(n)&&(n.__requireJsBuild=!0),"string"==typeof i?G(n)?l(C("requireargs","Invalid require call"),d):r&&t(k,i)?k[i](j[r.id]):g.get?g.get(E,i,r,u):(c=a(i,r,!1,!0),c=c.id,t(O,c)?O[c]:l(C("notloaded",'Module name "'+c+'" has not been loaded yet for context: '+e+(r?"":". Use require([])")))):(b(),E.nextTick(function(){b(),p=s(a(null,r)),p.skipMap=o.skipMap,p.init(i,n,d,{enabled:!0}),h()}),u)}return o=o||{},U(u,{isBrowser:z,toUrl:function(e){var t,n=e.lastIndexOf("."),o=e.split("/")[0];return-1!==n&&("."!==o&&".."!==o||n>1)&&(t=e.substring(n,e.length),e=e.substring(0,n)),E.nameToUrl(i(e,r&&r.id,!0),t,!0)},defined:function(e){return t(O,a(e,r,!1,!0).id)},specified:function(e){return e=a(e,r,!1,!0).id,t(O,e)||t(j,e)}}),r||(u.undef=function(e){c();var t=a(e,r,!0),i=m(j,e);i.undefed=!0,n(e),delete O[e],delete F[t.url],delete A[e],T(L,function(t,i){t[0]===e&&L.splice(i,1)}),i&&(i.events.defined&&(A[e]=i.events),p(e))}),u},enable:function(e){m(j,e.id)&&s(e).enable()},completeLoad:function(e){var i,n,o=m(P.shim,e)||{},a=o.exports;for(c();L.length;){if(n=L.shift(),null===n[0]){if(n[0]=e,i)break;i=!0}else n[0]===e&&(i=!0);y(n)}if(n=m(j,e),!i&&!t(O,e)&&n&&!n.inited){if(P.enforceDefine&&(!a||!da(a)))return r(e)?void 0:l(C("nodefine","No define call for "+e,null,[e]));y([e,o.deps||[],o.exportsFn])}h()},nameToUrl:function(e,t,i){var n,r,o;if((n=m(P.pkgs,e))&&(e=n),n=m(_,e))return E.nameToUrl(n,t,i);if(g.jsExtRegExp.test(e))n=e+(t||"");else{for(n=P.paths,e=e.split("/"),r=e.length;r>0;r-=1)if(o=e.slice(0,r).join("/"),o=m(n,o)){H(o)&&(o=o[0]),e.splice(0,r,o);break}n=e.join("/"),n+=t||(/^data\:|\?/.test(n)||i?"":".js"),n=("/"===n.charAt(0)||n.match(/^[\w\+\.\-]+:/)?"":P.baseUrl)+n}return P.urlArgs?n+((-1===n.indexOf("?")?"?":"&")+P.urlArgs):n},load:function(e,t){g.load(E,e,t)},execCb:function(e,t,i,n){return t.apply(n,i)},onScriptLoad:function(e){("load"===e.type||ja.test((e.currentTarget||e.srcElement).readyState))&&(N=null,e=x(e),E.completeLoad(e.id))},onScriptError:function(e){var t=x(e);return r(t.id)?void 0:l(C("scripterror","Script error for: "+t.id,e,[t.id]))}},E.require=E.makeRequire(),E}var g,x,y,D,I,E,N,J,s,O,ka=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,la=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,Q=/\.js$/,ia=/^\.\//;x=Object.prototype;var K=x.toString,fa=x.hasOwnProperty,ha=Array.prototype.splice,z=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),ea=!z&&"undefined"!=typeof importScripts,ja=z&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,Y="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),F={},q={},R=[],M=!1;if("undefined"==typeof define){if("undefined"!=typeof requirejs){if(G(requirejs))return;q=requirejs,requirejs=void 0}"undefined"!=typeof require&&!G(require)&&(q=require,require=void 0),g=requirejs=function(e,t,i,n){var r,o="_";return!H(e)&&"string"!=typeof e&&(r=e,H(t)?(e=t,t=i,i=n):e=[]),r&&r.context&&(o=r.context),(n=m(F,o))||(n=F[o]=g.s.newContext(o)),r&&n.configure(r),n.require(e,t,i)},g.config=function(e){return g(e)},g.nextTick="undefined"!=typeof setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=g),g.version="2.1.18",g.jsExtRegExp=/^\/|:|\?|\.js$/,g.isBrowser=z,x=g.s={contexts:F,newContext:ga},g({}),v(["toUrl","undef","defined","specified"],function(e){g[e]=function(){var t=F._;return t.require[e].apply(t,arguments)}}),z&&(y=x.head=document.getElementsByTagName("head")[0],D=document.getElementsByTagName("base")[0])&&(y=x.head=D.parentNode),g.onError=ca,g.createNode=function(e){var t=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return t.type=e.scriptType||"text/javascript",t.charset="utf-8",t.async=!0,t},g.load=function(e,t,i){var n=e&&e.config||{};if(z)return n=g.createNode(n,t,i),n.setAttribute("data-requirecontext",e.contextName),n.setAttribute("data-requiremodule",t),!n.attachEvent||n.attachEvent.toString&&0>n.attachEvent.toString().indexOf("[native code")||Y?(n.addEventListener("load",e.onScriptLoad,!1),n.addEventListener("error",e.onScriptError,!1)):(M=!0,n.attachEvent("onreadystatechange",e.onScriptLoad)),n.src=i,J=n,D?y.insertBefore(n,D):y.appendChild(n),J=null,n;if(ea)try{importScripts(i),e.completeLoad(t)}catch(r){e.onError(C("importscripts","importScripts failed for "+t+" at "+i,r,[t]))}},z&&!q.skipDataMain&&T(document.getElementsByTagName("script"),function(e){return y||(y=e.parentNode),(I=e.getAttribute("data-main"))?(s=I,q.baseUrl||(E=s.split("/"),s=E.pop(),O=E.length?E.join("/")+"/":"./",q.baseUrl=O),s=s.replace(Q,""),g.jsExtRegExp.test(s)&&(s=I),q.deps=q.deps?q.deps.concat(s):[s],!0):void 0}),define=function(e,t,i){var n,r;"string"!=typeof e&&(i=t,t=e,e=null),H(t)||(i=t,t=null),!t&&G(i)&&(t=[],i.length&&(i.toString().replace(ka,"").replace(la,function(e,i){t.push(i)}),t=(1===i.length?["require"]:["require","exports","module"]).concat(t))),M&&((n=J)||(N&&"interactive"===N.readyState||T(document.getElementsByTagName("script"),function(e){return"interactive"===e.readyState?N=e:void 0}),n=N),n&&(e||(e=n.getAttribute("data-requiremodule")),r=F[n.getAttribute("data-requirecontext")])),(r?r.defQueue:R).push([e,t,i])},define.amd={jQuery:!0},g.exec=function(b){return eval(b)},g(q)}}(this);var player,interval,players,supported,website;require.config({paths:{jquery:"//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min"}}),require(["jquery"],function(){function e(){var e,t,i,n="Pandora";return p(document).find(".playerBarSong").text().length>0?(e=p(document).find(".playerBarArtist").text(),t=p(document).find(".playerBarSong").text(),i=e+" - "+t):i="Paused",{song:i,webPlayer:n}}function t(){var e,t,i,n="Google Play";return p(document).find("#player-artist").text().length>0?(e=p(document).find("#player-artist").text(),t=p(document).find("#player-song-title").text(),i=e+" - "+t):i="Paused",{song:i,webPlayer:n}}function i(){var e,t,i,n="Spotify",r=p("title").text().split(" - ");return 3==r.length?(e=r[1],t=r[0],i=e+" - "+t):i="Paused",{song:i,webPlayer:n}}function n(){var e,t="Soundcloud";return e=p(document).find(".playbackSoundBadge__title").attr("title").length>0?p(document).find(".playbackSoundBadge__title").attr("title"):"Paused",{song:e,webPlayer:t}}function r(){var e,t="YouTube";return e=p(document).find("#eow-title").text().length?p(document).find("#eow-title").text():"Paused",{song:e,webPlayer:t}}function o(){var e=player();""!=e.song?(p(".NowPlayingBody").text(e.song),c(e.webPlayer,e.song)):p(".NowPlayingBody").text("No song playing")}function a(){if(!(p(".NowPlayingContainer").length>0)){l();var e=d();e?(o(),p(".NowPlayingSupported").text(website+" is supported!").css("color","green"),p(".NowPlayingButton").click(function(){"Start"==p(".NowPlayingButton").text()?(p(".NowPlayingButton").text("Stop"),s()):"Stop"==p(".NowPlayingButton").text()&&(p(".NowPlayingButton").text("Start"),u())})):p(".NowPlayingSupported").text(website).append(' is not supported.').css("color","red")}}function s(){o(),interval=setInterval(o,2e3)}function u(){null!=interval&&clearInterval(interval)}function d(){website=window.location.host;for(var e in players)website.includes(e)&&(player=players[e],supported=!0);return supported}function l(){var e="
OBS Now Playing
No song playing.
";p("body").append(e)}function c(e,t){var i="http://localhost:13337/";p.ajax({type:"POST",crossdomain:!0,contentType:"application/json; charset=utf-8",url:i,dataType:"json",data:{player:e,song:t},success:function(){}})}var p=window.jQuery;supported=!1,players={pandora:e,"play.google.com":t,"play.spotify.com":i,soundcloud:n,youtube:r},a()}); \ No newline at end of file +var requirejs, require, define; !function (ba) { function G(e) { return "[object Function]" === K.call(e) } function H(e) { return "[object Array]" === K.call(e) } function v(e, t) { if (e) { var i; for (i = 0; i < e.length && (!e[i] || !t(e[i], i, e)) ; i += 1); } } function T(e, t) { if (e) { var i; for (i = e.length - 1; i > -1 && (!e[i] || !t(e[i], i, e)) ; i -= 1); } } function t(e, t) { return fa.call(e, t) } function m(e, i) { return t(e, i) && e[i] } function B(e, i) { for (var n in e) if (t(e, n) && i(e[n], n)) break } function U(e, i, n, r) { return i && B(i, function (i, o) { (n || !t(e, o)) && (!r || "object" != typeof i || !i || H(i) || G(i) || i instanceof RegExp ? e[o] = i : (e[o] || (e[o] = {}), U(e[o], i, n, r))) }), e } function u(e, t) { return function () { return t.apply(e, arguments) } } function ca(e) { throw e } function da(e) { if (!e) return e; var t = ba; return v(e.split("."), function (e) { t = t[e] }), t } function C(e, t, i, n) { return t = Error(t + "\nhttp://requirejs.org/docs/errors.html#" + e), t.requireType = e, t.requireModules = n, i && (t.originalError = i), t } function ga(e) { function i(e, t, i) { var n, r, o, a, s, u, d, l, t = t && t.split("/"), c = P.map, p = c && c["*"]; if (e) { for (e = e.split("/"), r = e.length - 1, P.nodeIdCompat && Q.test(e[r]) && (e[r] = e[r].replace(Q, "")), "." === e[0].charAt(0) && t && (r = t.slice(0, t.length - 1), e = r.concat(e)), r = e, o = 0; o < r.length; o++) a = r[o], "." === a ? (r.splice(o, 1), o -= 1) : ".." === a && 0 !== o && (1 !== o || ".." !== r[2]) && ".." !== r[o - 1] && o > 0 && (r.splice(o - 1, 2), o -= 2); e = e.join("/") } if (i && c && (t || p)) { r = e.split("/"), o = r.length; e: for (; o > 0; o -= 1) { if (s = r.slice(0, o).join("/"), t) for (a = t.length; a > 0; a -= 1) if ((i = m(c, t.slice(0, a).join("/"))) && (i = m(i, s))) { n = i, u = o; break e } !d && p && m(p, s) && (d = m(p, s), l = o) } !n && d && (n = d, u = l), n && (r.splice(0, u, n), e = r.join("/")) } return (n = m(P.pkgs, e)) ? n : e } function n(e) { z && v(document.getElementsByTagName("script"), function (t) { return t.getAttribute("data-requiremodule") === e && t.getAttribute("data-requirecontext") === E.contextName ? (t.parentNode.removeChild(t), !0) : void 0 }) } function r(e) { var t = m(P.paths, e); return t && H(t) && 1 < t.length ? (t.shift(), E.require.undef(e), E.makeRequire(null, { skipMap: !0 })([e]), !0) : void 0 } function o(e) { var t, i = e ? e.indexOf("!") : -1; return i > -1 && (t = e.substring(0, i), e = e.substring(i + 1, e.length)), [t, e] } function a(e, t, n, r) { var a, s, u = null, d = t ? t.name : null, l = e, c = !0, p = ""; return e || (c = !1, e = "_@r" + (I += 1)), e = o(e), u = e[0], e = e[1], u && (u = i(u, d, r), s = m(O, u)), e && (u ? p = s && s.normalize ? s.normalize(e, function (e) { return i(e, d, r) }) : -1 === e.indexOf("!") ? i(e, d, r) : e : (p = i(e, d, r), e = o(p), u = e[0], p = e[1], n = !0, a = E.nameToUrl(p))), n = !u || s || n ? "" : "_unnormalized" + (J += 1), { prefix: u, name: p, parentMap: t, unnormalized: !!n, url: a, originalName: l, isDefine: c, id: (u ? u + "!" + p : p) + n } } function s(e) { var t = e.id, i = m(j, t); return i || (i = j[t] = new E.Module(e)), i } function d(e, i, n) { var r = e.id, o = m(j, r); !t(O, r) || o && !o.defineEmitComplete ? (o = s(e), o.error && "error" === i ? n(o.error) : o.on(i, n)) : "defined" === i && n(O[r]) } function l(e, t) { var i = e.requireModules, n = !1; t ? t(e) : (v(i, function (t) { (t = m(j, t)) && (t.error = e, t.events.error && (n = !0, t.emit("error", e))) }), n || g.onError(e)) } function c() { R.length && (ha.apply(L, [L.length, 0].concat(R)), R = []) } function p(e) { delete j[e], delete D[e] } function f(e, t, i) { var n = e.map.id; e.error ? e.emit("error", e.error) : (t[n] = !0, v(e.depMaps, function (n, r) { var o = n.id, a = m(j, o); a && !e.depMatched[r] && !i[o] && (m(t, o) ? (e.defineDep(r, O[o]), e.check()) : f(a, t, i)) }), i[n] = !0) } function h() { var e, t, i = (e = 1e3 * P.waitSeconds) && E.startTime + e < (new Date).getTime(), o = [], a = [], s = !1, u = !0; if (!q) { if (q = !0, B(D, function (e) { var d = e.map, l = d.id; if (e.enabled && (d.isDefine || a.push(e), !e.error)) if (!e.inited && i) r(l) ? s = t = !0 : (o.push(l), n(l)); else if (!e.inited && e.fetched && d.isDefine && (s = !0, !d.prefix)) return u = !1 }), i && o.length) return e = C("timeout", "Load timeout for modules: " + o, null, o), e.contextName = E.contextName, l(e); u && v(a, function (e) { f(e, {}, {}) }), i && !t || !s || !z && !ea || S || (S = setTimeout(function () { S = 0, h() }, 50)), q = !1 } } function y(e) { t(O, e[0]) || s(a(e[0], null, !0)).init(e[1], e[2]) } function x(e) { var e = e.currentTarget || e.srcElement, t = E.onScriptLoad; return e.detachEvent && !Y ? e.detachEvent("onreadystatechange", t) : e.removeEventListener("load", t, !1), t = E.onScriptError, (!e.detachEvent || Y) && e.removeEventListener("error", t, !1), { node: e, id: e && e.getAttribute("data-requiremodule") } } function b() { var e; for (c() ; L.length;) { if (e = L.shift(), null === e[0]) return l(C("mismatch", "Mismatched anonymous define() module: " + e[e.length - 1])); y(e) } } var q, w, E, k, S, P = { waitSeconds: 7, baseUrl: "./", paths: {}, bundles: {}, pkgs: {}, shim: {}, config: {} }, j = {}, D = {}, A = {}, L = [], O = {}, _ = {}, F = {}, I = 1, J = 1; return k = { require: function (e) { return e.require ? e.require : e.require = E.makeRequire(e.map) }, exports: function (e) { return e.usingExports = !0, e.map.isDefine ? e.exports ? O[e.map.id] = e.exports : e.exports = O[e.map.id] = {} : void 0 }, module: function (e) { return e.module ? e.module : e.module = { id: e.map.id, uri: e.map.url, config: function () { return m(P.config, e.map.id) || {} }, exports: e.exports || (e.exports = {}) } } }, w = function (e) { this.events = m(A, e.id) || {}, this.map = e, this.shim = m(P.shim, e.id), this.depExports = [], this.depMaps = [], this.depMatched = [], this.pluginMaps = {}, this.depCount = 0 }, w.prototype = { init: function (e, t, i, n) { n = n || {}, this.inited || (this.factory = t, i ? this.on("error", i) : this.events.error && (i = u(this, function (e) { this.emit("error", e) })), this.depMaps = e && e.slice(0), this.errback = i, this.inited = !0, this.ignore = n.ignore, n.enabled || this.enabled ? this.enable() : this.check()) }, defineDep: function (e, t) { this.depMatched[e] || (this.depMatched[e] = !0, this.depCount -= 1, this.depExports[e] = t) }, fetch: function () { if (!this.fetched) { this.fetched = !0, E.startTime = (new Date).getTime(); var e = this.map; if (!this.shim) return e.prefix ? this.callPlugin() : this.load(); E.makeRequire(this.map, { enableBuildCallback: !0 })(this.shim.deps || [], u(this, function () { return e.prefix ? this.callPlugin() : this.load() })) } }, load: function () { var e = this.map.url; _[e] || (_[e] = !0, E.load(this.map.id, e)) }, check: function () { if (this.enabled && !this.enabling) { var e, t, i = this.map.id; t = this.depExports; var n = this.exports, r = this.factory; if (this.inited) { if (this.error) this.emit("error", this.error); else if (!this.defining) { if (this.defining = !0, 1 > this.depCount && !this.defined) { if (G(r)) { if (this.events.error && this.map.isDefine || g.onError !== ca) try { n = E.execCb(i, r, t, n) } catch (o) { e = o } else n = E.execCb(i, r, t, n); if (this.map.isDefine && void 0 === n && ((t = this.module) ? n = t.exports : this.usingExports && (n = this.exports)), e) return e.requireMap = this.map, e.requireModules = this.map.isDefine ? [this.map.id] : null, e.requireType = this.map.isDefine ? "define" : "require", l(this.error = e) } else n = r; this.exports = n, this.map.isDefine && !this.ignore && (O[i] = n, g.onResourceLoad) && g.onResourceLoad(E, this.map, this.depMaps), p(i), this.defined = !0 } this.defining = !1, this.defined && !this.defineEmitted && (this.defineEmitted = !0, this.emit("defined", this.exports), this.defineEmitComplete = !0) } } else this.fetch() } }, callPlugin: function () { var e = this.map, n = e.id, r = a(e.prefix); this.depMaps.push(r), d(r, "defined", u(this, function (r) { var o, c; c = m(F, this.map.id); var f = this.map.name, h = this.map.parentMap ? this.map.parentMap.name : null, v = E.makeRequire(e.parentMap, { enableBuildCallback: !0 }); this.map.unnormalized ? (r.normalize && (f = r.normalize(f, function (e) { return i(e, h, !0) }) || ""), r = a(e.prefix + "!" + f, this.map.parentMap), d(r, "defined", u(this, function (e) { this.init([], function () { return e }, null, { enabled: !0, ignore: !0 }) })), (c = m(j, r.id)) && (this.depMaps.push(r), this.events.error && c.on("error", u(this, function (e) { this.emit("error", e) })), c.enable())) : c ? (this.map.url = E.nameToUrl(c), this.load()) : (o = u(this, function (e) { this.init([], function () { return e }, null, { enabled: !0 }) }), o.error = u(this, function (e) { this.inited = !0, this.error = e, e.requireModules = [n], B(j, function (e) { 0 === e.map.id.indexOf(n + "_unnormalized") && p(e.map.id) }), l(e) }), o.fromText = u(this, function (i, r) { var u = e.name, d = a(u), c = M; r && (i = r), c && (M = !1), s(d), t(P.config, n) && (P.config[u] = P.config[n]); try { g.exec(i) } catch (p) { return l(C("fromtexteval", "fromText eval for " + n + " failed: " + p, p, [n])) } c && (M = !0), this.depMaps.push(d), E.completeLoad(u), v([u], o) }), r.load(e.name, v, o, P)) })), E.enable(r, this), this.pluginMaps[r.id] = r }, enable: function () { D[this.map.id] = this, this.enabling = this.enabled = !0, v(this.depMaps, u(this, function (e, i) { var n, r; if ("string" == typeof e) { if (e = a(e, this.map.isDefine ? this.map : this.map.parentMap, !1, !this.skipMap), this.depMaps[i] = e, n = m(k, e.id)) return void (this.depExports[i] = n(this)); this.depCount += 1, d(e, "defined", u(this, function (e) { this.undefed || (this.defineDep(i, e), this.check()) })), this.errback ? d(e, "error", u(this, this.errback)) : this.events.error && d(e, "error", u(this, function (e) { this.emit("error", e) })) } n = e.id, r = j[n], !t(k, n) && r && !r.enabled && E.enable(e, this) })), B(this.pluginMaps, u(this, function (e) { var t = m(j, e.id); t && !t.enabled && E.enable(e, this) })), this.enabling = !1, this.check() }, on: function (e, t) { var i = this.events[e]; i || (i = this.events[e] = []), i.push(t) }, emit: function (e, t) { v(this.events[e], function (e) { e(t) }), "error" === e && delete this.events[e] } }, E = { config: P, contextName: e, registry: j, defined: O, urlFetched: _, defQueue: L, Module: w, makeModuleMap: a, nextTick: g.nextTick, onError: l, configure: function (e) { e.baseUrl && "/" !== e.baseUrl.charAt(e.baseUrl.length - 1) && (e.baseUrl += "/"); var t = P.shim, i = { paths: !0, bundles: !0, config: !0, map: !0 }; B(e, function (e, t) { i[t] ? (P[t] || (P[t] = {}), U(P[t], e, !0, !0)) : P[t] = e }), e.bundles && B(e.bundles, function (e, t) { v(e, function (e) { e !== t && (F[e] = t) }) }), e.shim && (B(e.shim, function (e, i) { H(e) && (e = { deps: e }), !e.exports && !e.init || e.exportsFn || (e.exportsFn = E.makeShimExports(e)), t[i] = e }), P.shim = t), e.packages && v(e.packages, function (e) { var t, e = "string" == typeof e ? { name: e } : e; t = e.name, e.location && (P.paths[t] = e.location), P.pkgs[t] = e.name + "/" + (e.main || "main").replace(ia, "").replace(Q, "") }), B(j, function (e, t) { !e.inited && !e.map.unnormalized && (e.map = a(t, null, !0)) }), (e.deps || e.callback) && E.require(e.deps || [], e.callback) }, makeShimExports: function (e) { return function () { var t; return e.init && (t = e.init.apply(ba, arguments)), t || e.exports && da(e.exports) } }, makeRequire: function (r, o) { function u(i, n, d) { var c, p; return o.enableBuildCallback && n && G(n) && (n.__requireJsBuild = !0), "string" == typeof i ? G(n) ? l(C("requireargs", "Invalid require call"), d) : r && t(k, i) ? k[i](j[r.id]) : g.get ? g.get(E, i, r, u) : (c = a(i, r, !1, !0), c = c.id, t(O, c) ? O[c] : l(C("notloaded", 'Module name "' + c + '" has not been loaded yet for context: ' + e + (r ? "" : ". Use require([])")))) : (b(), E.nextTick(function () { b(), p = s(a(null, r)), p.skipMap = o.skipMap, p.init(i, n, d, { enabled: !0 }), h() }), u) } return o = o || {}, U(u, { isBrowser: z, toUrl: function (e) { var t, n = e.lastIndexOf("."), o = e.split("/")[0]; return -1 !== n && ("." !== o && ".." !== o || n > 1) && (t = e.substring(n, e.length), e = e.substring(0, n)), E.nameToUrl(i(e, r && r.id, !0), t, !0) }, defined: function (e) { return t(O, a(e, r, !1, !0).id) }, specified: function (e) { return e = a(e, r, !1, !0).id, t(O, e) || t(j, e) } }), r || (u.undef = function (e) { c(); var t = a(e, r, !0), i = m(j, e); i.undefed = !0, n(e), delete O[e], delete _[t.url], delete A[e], T(L, function (t, i) { t[0] === e && L.splice(i, 1) }), i && (i.events.defined && (A[e] = i.events), p(e)) }), u }, enable: function (e) { m(j, e.id) && s(e).enable() }, completeLoad: function (e) { var i, n, o = m(P.shim, e) || {}, a = o.exports; for (c() ; L.length;) { if (n = L.shift(), null === n[0]) { if (n[0] = e, i) break; i = !0 } else n[0] === e && (i = !0); y(n) } if (n = m(j, e), !i && !t(O, e) && n && !n.inited) { if (P.enforceDefine && (!a || !da(a))) return r(e) ? void 0 : l(C("nodefine", "No define call for " + e, null, [e])); y([e, o.deps || [], o.exportsFn]) } h() }, nameToUrl: function (e, t, i) { var n, r, o; if ((n = m(P.pkgs, e)) && (e = n), n = m(F, e)) return E.nameToUrl(n, t, i); if (g.jsExtRegExp.test(e)) n = e + (t || ""); else { for (n = P.paths, e = e.split("/"), r = e.length; r > 0; r -= 1) if (o = e.slice(0, r).join("/"), o = m(n, o)) { H(o) && (o = o[0]), e.splice(0, r, o); break } n = e.join("/"), n += t || (/^data\:|\?/.test(n) || i ? "" : ".js"), n = ("/" === n.charAt(0) || n.match(/^[\w\+\.\-]+:/) ? "" : P.baseUrl) + n } return P.urlArgs ? n + ((-1 === n.indexOf("?") ? "?" : "&") + P.urlArgs) : n }, load: function (e, t) { g.load(E, e, t) }, execCb: function (e, t, i, n) { return t.apply(n, i) }, onScriptLoad: function (e) { ("load" === e.type || ja.test((e.currentTarget || e.srcElement).readyState)) && (N = null, e = x(e), E.completeLoad(e.id)) }, onScriptError: function (e) { var t = x(e); return r(t.id) ? void 0 : l(C("scripterror", "Script error for: " + t.id, e, [t.id])) } }, E.require = E.makeRequire(), E } var g, x, y, D, I, E, N, J, s, O, ka = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm, la = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, Q = /\.js$/, ia = /^\.\//; x = Object.prototype; var K = x.toString, fa = x.hasOwnProperty, ha = Array.prototype.splice, z = !("undefined" == typeof window || "undefined" == typeof navigator || !window.document), ea = !z && "undefined" != typeof importScripts, ja = z && "PLAYSTATION 3" === navigator.platform ? /^complete$/ : /^(complete|loaded)$/, Y = "undefined" != typeof opera && "[object Opera]" === opera.toString(), F = {}, q = {}, R = [], M = !1; if ("undefined" == typeof define) { if ("undefined" != typeof requirejs) { if (G(requirejs)) return; q = requirejs, requirejs = void 0 } "undefined" != typeof require && !G(require) && (q = require, require = void 0), g = requirejs = function (e, t, i, n) { var r, o = "_"; return !H(e) && "string" != typeof e && (r = e, H(t) ? (e = t, t = i, i = n) : e = []), r && r.context && (o = r.context), (n = m(F, o)) || (n = F[o] = g.s.newContext(o)), r && n.configure(r), n.require(e, t, i) }, g.config = function (e) { return g(e) }, g.nextTick = "undefined" != typeof setTimeout ? function (e) { setTimeout(e, 4) } : function (e) { e() }, require || (require = g), g.version = "2.1.18", g.jsExtRegExp = /^\/|:|\?|\.js$/, g.isBrowser = z, x = g.s = { contexts: F, newContext: ga }, g({}), v(["toUrl", "undef", "defined", "specified"], function (e) { g[e] = function () { var t = F._; return t.require[e].apply(t, arguments) } }), z && (y = x.head = document.getElementsByTagName("head")[0], D = document.getElementsByTagName("base")[0]) && (y = x.head = D.parentNode), g.onError = ca, g.createNode = function (e) { var t = e.xhtml ? document.createElementNS("http://www.w3.org/1999/xhtml", "html:script") : document.createElement("script"); return t.type = e.scriptType || "text/javascript", t.charset = "utf-8", t.async = !0, t }, g.load = function (e, t, i) { var n = e && e.config || {}; if (z) return n = g.createNode(n, t, i), n.setAttribute("data-requirecontext", e.contextName), n.setAttribute("data-requiremodule", t), !n.attachEvent || n.attachEvent.toString && 0 > n.attachEvent.toString().indexOf("[native code") || Y ? (n.addEventListener("load", e.onScriptLoad, !1), n.addEventListener("error", e.onScriptError, !1)) : (M = !0, n.attachEvent("onreadystatechange", e.onScriptLoad)), n.src = i, J = n, D ? y.insertBefore(n, D) : y.appendChild(n), J = null, n; if (ea) try { importScripts(i), e.completeLoad(t) } catch (r) { e.onError(C("importscripts", "importScripts failed for " + t + " at " + i, r, [t])) } }, z && !q.skipDataMain && T(document.getElementsByTagName("script"), function (e) { return y || (y = e.parentNode), (I = e.getAttribute("data-main")) ? (s = I, q.baseUrl || (E = s.split("/"), s = E.pop(), O = E.length ? E.join("/") + "/" : "./", q.baseUrl = O), s = s.replace(Q, ""), g.jsExtRegExp.test(s) && (s = I), q.deps = q.deps ? q.deps.concat(s) : [s], !0) : void 0 }), define = function (e, t, i) { var n, r; "string" != typeof e && (i = t, t = e, e = null), H(t) || (i = t, t = null), !t && G(i) && (t = [], i.length && (i.toString().replace(ka, "").replace(la, function (e, i) { t.push(i) }), t = (1 === i.length ? ["require"] : ["require", "exports", "module"]).concat(t))), M && ((n = J) || (N && "interactive" === N.readyState || T(document.getElementsByTagName("script"), function (e) { return "interactive" === e.readyState ? N = e : void 0 }), n = N), n && (e || (e = n.getAttribute("data-requiremodule")), r = F[n.getAttribute("data-requirecontext")])), (r ? r.defQueue : R).push([e, t, i]) }, define.amd = { jQuery: !0 }, g.exec = function (b) { return eval(b) }, g(q) } }(this); var player, interval, players, supported, website; require.config({ paths: { jquery: "//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min" } }), require(["jquery"], function () { function e() { var e, t, i, n = "Pandora"; return void 0 === p(document).find(".playerBarSong").text() || null === p(document).find(".playerBarSong").text() ? i = "Paused" : (e = p(document).find(".playerBarArtist").text(), t = p(document).find(".playerBarSong").text(), i = e + " - " + t), { song: i, webPlayer: n } } function t() { var e, t, i, n = "Google Play"; return void 0 === p(document).find("#player-artist").text() || null === p(document).find("#player-artist").text() ? i = "Paused" : (e = p(document).find("#player-artist").text(), t = p(document).find("#player-song-title").text(), i = e + " - " + t), { song: i, webPlayer: n } } function i() { var e, t, i, n = "Spotify", r = p("title").text().split(" - "); return 3 == r.length ? (e = r[1], t = r[0], i = e + " - " + t) : i = "Paused", { song: i, webPlayer: n } } function n() { var e, t = "Soundcloud"; return e = void 0 === p(document).find(".playbackSoundBadge__title").attr("title") || null === p(document).find(".playbackSoundBadge__title").attr("title") ? "Paused" : p(document).find(".playbackSoundBadge__title").attr("title"), { song: e, webPlayer: t } } function r() { var e, t = "YouTube"; return e = void 0 === p(document).find("#eow-title").text() || null === p(document).find("#eow-title").text() ? "Paused" : p(document).find("#eow-title").text().trim(), { song: e, webPlayer: t } } function o() { var e = player(); "" != e.song ? (p(".NowPlayingBody").text(e.song), c(e.webPlayer, e.song)) : p(".NowPlayingBody").text("No song playing") } function a() { if (!(p(".NowPlayingContainer").length > 0)) { l(); var e = d(); e ? (o(), p(".NowPlayingSupported").text(website + " is supported!").css("color", "green"), p(".NowPlayingButton").click(function () { "Start" == p(".NowPlayingButton").text() ? (p(".NowPlayingButton").text("Stop"), s()) : "Stop" == p(".NowPlayingButton").text() && (p(".NowPlayingButton").text("Start"), u()) })) : p(".NowPlayingSupported").text(website).append(' is not supported.').css("color", "red") } } function s() { o(), interval = setInterval(o, 2e3) } function u() { null != interval && clearInterval(interval) } function d() { website = window.location.host; for (var e in players) website.includes(e) && (player = players[e], supported = !0); return supported } function l() { var e = "
OBS Now Playing
No song playing.
"; p("body").append(e) } function c(e, t) { var i = "http://localhost:13337/"; p.ajax({ type: "POST", crossdomain: !0, contentType: "application/json; charset=utf-8", url: i, dataType: "json", data: { player: e, song: t }, success: function () { } }) } var p = window.jQuery; supported = !1, players = { pandora: e, "play.google.com": t, "play.spotify.com": i, soundcloud: n, youtube: r }, a() }); \ No newline at end of file