From ed67ac61cbd52d1b4af1bf3a6633b3b8cc9de86a Mon Sep 17 00:00:00 2001
From: uimaxbai <61615730+uimaxbai@users.noreply.github.com>
Date: Tue, 30 Dec 2025 18:12:09 +0000
Subject: [PATCH 01/14] use old jquery
---
legacy/index.html | 1 +
legacy/jquery.min.js | 32 ++++
legacy/legacy.js | 349 ++++++++++++++++++-------------------------
3 files changed, 175 insertions(+), 207 deletions(-)
create mode 100644 legacy/jquery.min.js
diff --git a/legacy/index.html b/legacy/index.html
index bdde588..ff868a5 100644
--- a/legacy/index.html
+++ b/legacy/index.html
@@ -4,6 +4,7 @@
Monochrome Legacy
+
diff --git a/legacy/jquery.min.js b/legacy/jquery.min.js
new file mode 100644
index 0000000..82b98e1
--- /dev/null
+++ b/legacy/jquery.min.js
@@ -0,0 +1,32 @@
+/*
+ * jQuery 1.2.6 - New Wave Javascript
+ *
+ * Copyright (c) 2008 John Resig (jquery.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $
+ * $Rev: 5685 $
+ */
+(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else
+return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else
+return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else
+selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else
+this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else
+return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
+jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==i){target=this;--i;}for(;i-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else
+jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+">"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("",""]||!tags.indexOf("",""]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,""]||!tags.indexOf(""," "]||(!tags.indexOf(""," "]||!tags.indexOf(""," "]||jQuery.browser.msie&&[1,"div","
"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf(""&&tags.indexOf("=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else
+ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(name in elem&¬xml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&¬xml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&¬xml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)ret[0]=array;else
+while(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return im[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else
+for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("
").append(res.responseText.replace(/
+
+
+
@@ -44,7 +47,8 @@
Free and open software
- made by binimum
+ made by binimum
+ all browsers that support aac audio (may work in unsupported browsers with adobe flash) or flac audio should work
diff --git a/legacy/legacy.js b/legacy/legacy.js
index e20ddae..ea38154 100644
--- a/legacy/legacy.js
+++ b/legacy/legacy.js
@@ -1,9 +1,9 @@
// jQuery 1.12.4 Legacy Support
$(document).ready(function () {
- var currentApiUrl = ""; // Will be set from instances.json
+ var apiInstances = [];
+ var currentInstanceIndex = 0;
var isHttpFallback = false;
var FALLBACK_INSTANCES = [
- "https://triton.squid.wtf",
"https://wolf.qqdl.site",
"https://maus.qqdl.site",
"https://vogel.qqdl.site",
@@ -15,9 +15,15 @@ $(document).ready(function () {
var audioPlayer = $("#audio-player")[0];
var currentTrackInfo = $("#now-playing-info");
+ // Initialize SoundJS
+ // Note: Class is FlashPlugin in 0.5.2, but SWF is FlashAudioPlugin.swf
+ createjs.FlashPlugin.swfPath = "./";
+ // Prioritize HTMLAudio -> WebAudio -> Flash
+ // HTMLAudio is better for streaming music (avoids XHR/CORS issues of WebAudio)
+ createjs.Sound.registerPlugins([createjs.HTMLAudioPlugin, createjs.WebAudioPlugin, createjs.FlashPlugin]);
+
// Initial Load
- fetchInstances(function (url) {
- currentApiUrl = url;
+ fetchInstances(function () {
loadRecentTracks();
});
@@ -35,55 +41,164 @@ $(document).ready(function () {
// Global functions exposed for inline onclicks
// Global functions exposed for inline onclicks
+ // Global Stop function to prevent overlap
+ function stopAllAudio() {
+ // 1. Stop SoundJS
+ if (typeof createjs !== "undefined" && createjs.Sound) {
+ createjs.Sound.stop();
+ }
+
+ // 2. Stop DOM Player
+ if (audioPlayer) {
+ try {
+ audioPlayer.pause();
+ audioPlayer.currentTime = 0;
+ // Don't clear src immediately as it might flash, just pause.
+ } catch(e) { }
+ }
+ }
+
window.playTrack = function (id, attemptFallback) {
var quality = attemptFallback ? "HIGH" : "LOSSLESS";
apiRequest(
"/track/?id=" + id + "&quality=" + quality,
function (data) {
- var success = false;
if (data && data.data && data.data.manifest) {
try {
var manifestStr = base64Decode(data.data.manifest);
var manifest = JSON.parse(manifestStr);
if (manifest.urls && manifest.urls.length > 0) {
var streamUrl = manifest.urls[0];
- // Check if HTML5 audio is supported and has play method
- if (audioPlayer && typeof audioPlayer.play === 'function') {
- audioPlayer.src = streamUrl;
- audioPlayer.play();
- } else {
- playWithEmbed(streamUrl);
- }
-
- if (currentTrackInfo.length) {
- var qualityLabel = attemptFallback ? " (AAC)" : " (FLAC)";
- currentTrackInfo.html("Now Playing..." + qualityLabel);
- }
- success = true;
+
+ // Unified Playback Strategy:
+ // 1. Stop Everything
+ stopAllAudio();
+
+ // 2. Try Native DOM Player (Visible Interface)
+ // If this works, user gets controls. If it fails (IE), we fallback to SoundJS.
+ playNativeFirst(streamUrl, id, quality);
}
} catch (e) {
- // Fall through to fallback
+ console.log("Manifest error: " + e);
}
- }
-
- if (!success) {
- if (!attemptFallback) {
- // Try fallback to HIGH (AAC)
- window.playTrack(id, true);
- } else {
- alert("No stream URLs found or invalid manifest.");
- }
+ } else {
+ handleError("Invalid track data");
}
},
function (err) {
- if (!attemptFallback) {
- // Try fallback to HIGH (AAC) on request error too
- window.playTrack(id, true);
- } else {
- alert("Error playing track: " + err);
- }
+ handleError(err);
}
);
+
+ function playNativeFirst(url, id, quality) {
+ var domPlayer = $("#audio-player")[0];
+
+ // Quality Label
+ var qLabel = (quality === "LOSSLESS") ? " (FLAC)" : " (AAC)";
+ if (attemptFallback) qLabel = " (AAC)";
+
+ // Basic check for audio support
+ if (domPlayer && typeof domPlayer.play === 'function') {
+ updateStatus("Starting Native Playback" + qLabel + "...");
+
+ // Set error handler for THIS attempt
+ domPlayer.onerror = function() {
+ var errCode = domPlayer.error ? domPlayer.error.code : 0;
+ console.log("Native Error Code: " + errCode);
+ // Fallback to legacy
+ playLegacySoundJS(url, id, quality);
+ };
+
+ try {
+ domPlayer.src = url;
+ var playPromise = domPlayer.play();
+
+ if (playPromise !== undefined) {
+ playPromise
+ .then(function() {
+ updateStatus("Now Playing..." + qLabel);
+ })
+ .catch(function(e) {
+ console.log("Native Play Promise Rejected: " + e.name);
+ // Auto-play policy or format issue?
+ // Try SounJS as fallback
+ playLegacySoundJS(url, id, quality);
+ });
+ } else {
+ // Legacy browser (no promise), assume success unless onError fires
+ updateStatus("Now Playing..." + qLabel);
+ }
+ } catch (e) {
+ console.log("Native Exception: " + e.message);
+ playLegacySoundJS(url, id, quality);
+ }
+
+ } else {
+ // No native audio support (IE < 9)
+ playLegacySoundJS(url, id, quality);
+ }
+ }
+
+ function playLegacySoundJS(url, id, quality) {
+ updateStatus("Activating Legacy Player (Flash)...");
+
+ // SoundJS Logic
+ var soundJsUrl = url;
+ // Hint extension for SoundJS
+ if (soundJsUrl.indexOf(".mp3") === -1 && soundJsUrl.indexOf(".m4a") === -1) {
+ soundJsUrl += "#.m4a"; // Default to AAC hint
+ }
+
+ // If FLAC and we are here, SoundJS will likely fail, but we'll try or alert.
+ if (quality === "LOSSLESS") {
+ // SoundJS can't do FLAC. And if native failed, we are out of luck for FLAC.
+ // Try falling back to AAC quality for the whole track?
+ if (!attemptFallback) {
+ console.log("FLAC failed native, switching to HIGH quality fallback...");
+ window.playTrack(id, true);
+ return;
+ }
+ }
+
+ var soundId = "track_" + id + "_" + quality;
+ createjs.Sound.removeAllEventListeners("fileload");
+
+ var playSound = function() {
+ var instance = createjs.Sound.play(soundId);
+ if (!instance || instance.playState === createjs.Sound.PLAY_FAILED) {
+ handleError("Legacy Playback Failed");
+ } else {
+ updateStatus("Now Playing via Flash/Legacy...");
+ }
+ };
+
+ createjs.Sound.addEventListener("fileload", function(event) {
+ if (event.id === soundId) {
+ playSound();
+ }
+ });
+
+ try {
+ createjs.Sound.registerSound(soundJsUrl, soundId);
+ } catch(e) {
+ handleError("Legacy Setup Failed: " + e.message);
+ }
+ }
+
+ function updateStatus(msg) {
+ if (currentTrackInfo.length) {
+ currentTrackInfo.html(msg);
+ }
+ }
+
+ function handleError(msg) {
+ if (!attemptFallback) {
+ window.playTrack(id, true);
+ } else {
+ // alert("Playback Error: " + (msg || "Unknown"));
+ updateStatus("Error: " + msg);
+ }
+ }
};
function loadRecentTracks() {
@@ -106,16 +221,19 @@ $(document).ready(function () {
function fetchInstances(callback) {
// using $.ajax directly to handle errors robustly
$.ajax({
- url: "instances.json",
+ url: "/instances.json",
dataType: "json",
success: function (instances) {
if (instances && instances.length > 0) {
- var randomUrl =
- instances[Math.floor(Math.random() * instances.length)];
- if (randomUrl.charAt(randomUrl.length - 1) === "/") {
- randomUrl = randomUrl.substring(0, randomUrl.length - 1);
+ apiInstances = shuffleArray(instances);
+ // Clean URLs
+ for (var i = 0; i < apiInstances.length; i++) {
+ if (apiInstances[i].charAt(apiInstances[i].length - 1) === "/") {
+ apiInstances[i] = apiInstances[i].substring(0, apiInstances[i].length - 1);
+ }
}
- callback(randomUrl);
+ currentInstanceIndex = 0;
+ callback();
} else {
useFallback(callback);
}
@@ -127,9 +245,19 @@ $(document).ready(function () {
}
function useFallback(callback) {
- var randomUrl =
- FALLBACK_INSTANCES[Math.floor(Math.random() * FALLBACK_INSTANCES.length)];
- callback(randomUrl);
+ apiInstances = shuffleArray(FALLBACK_INSTANCES.slice()); // Copy and shuffle
+ currentInstanceIndex = 0;
+ callback();
+ }
+
+ function shuffleArray(array) {
+ for (var i = array.length - 1; i > 0; i--) {
+ var j = Math.floor(Math.random() * (i + 1));
+ var temp = array[i];
+ array[i] = array[j];
+ array[j] = temp;
+ }
+ return array;
}
function performSearch(query) {
@@ -211,9 +339,20 @@ $(document).ready(function () {
}
function apiRequest(endpoint, success, error) {
- var finalUrl = currentApiUrl;
- if (isHttpFallback && finalUrl.indexOf("https://") === 0) {
- finalUrl = "http://" + finalUrl.substring(8);
+ if (apiInstances.length === 0) {
+ error("No API instances available.");
+ return;
+ }
+
+ var currentBaseUrl = apiInstances[currentInstanceIndex];
+ var finalUrl = currentBaseUrl;
+
+ // Check for HTTP fallback
+ if (isHttpFallback) {
+ // If original was https, downgrade it
+ if (finalUrl.indexOf("https://") === 0) {
+ finalUrl = "http://" + finalUrl.substring(8);
+ }
}
try {
@@ -222,28 +361,47 @@ $(document).ready(function () {
method: "GET",
dataType: "json",
success: function (data) {
+ // Logic: If successful with HTTP fallback, maybe we should stick to it?
+ // For now, we just proceed.
success(data);
},
error: function (xhr, status, errorThrown) {
- if (!isHttpFallback && window.location.protocol !== "https:") {
- isHttpFallback = true;
- // Retry with fallback logic (recursive call will pick up isHttpFallback)
- apiRequest(endpoint, success, error);
- } else {
- error("Request Failed: " + status + " (" + errorThrown + ")");
- }
+ handleApiError(endpoint, success, error, status + " (" + errorThrown + ")");
}
});
} catch (e) {
- if (!isHttpFallback && window.location.protocol !== "https:") {
- isHttpFallback = true;
- apiRequest(endpoint, success, error);
- } else {
- error("Exception: " + e.message);
- }
+ handleApiError(endpoint, success, error, "Exception: " + e.message);
}
}
+ function handleApiError(endpoint, success, error, errorMsg) {
+ // 1. Try HTTP fallback for current instance if allowed
+ if (!isHttpFallback && window.location.protocol !== "https:") {
+ // Only if current instance is HTTPS
+ if (apiInstances[currentInstanceIndex].indexOf("https://") === 0) {
+ isHttpFallback = true;
+ apiRequest(endpoint, success, error);
+ return;
+ }
+ }
+
+ // 2. Move to next instance
+ isHttpFallback = false; // Reset for next instance
+ currentInstanceIndex++;
+
+ if (currentInstanceIndex < apiInstances.length) {
+ // Retry with next instance
+ apiRequest(endpoint, success, error);
+ } else {
+ // All instances failed
+ // We could try to reset index and wait, but for now we fail.
+ // Or maybe we should loop back to 0? But infinite loops are bad.
+ // Let's just fail after one full rotation.
+ currentInstanceIndex = 0; // Reset for next user interaction attempt
+ error("All API instances failed. Last error: " + errorMsg);
+ }
+ }
+
function playWithEmbed(url) {
var container = $("#audio-container");
if (container.length === 0) {
diff --git a/legacy/soundjs-0.5.2.min.js b/legacy/soundjs-0.5.2.min.js
new file mode 100644
index 0000000..be86dd7
--- /dev/null
+++ b/legacy/soundjs-0.5.2.min.js
@@ -0,0 +1,18 @@
+/*!
+* @license SoundJS
+* Visit http://createjs.com/ for documentation, updates and examples.
+*
+* Copyright (c) 2011-2013 gskinner.com, inc.
+*
+* Distributed under the terms of the MIT license.
+* http://www.opensource.org/licenses/mit-license.html
+*
+* This notice shall be included in all copies or substantial portions of the Software.
+*/
+
+/**!
+ * SoundJS FlashPlugin also includes swfobject (http://code.google.com/p/swfobject/)
+ */
+
+this.createjs=this.createjs||{},function(){var a=createjs.SoundJS=createjs.SoundJS||{};a.version="0.5.2",a.buildDate="Thu, 12 Dec 2013 23:33:37 GMT"}(),this.createjs=this.createjs||{},function(){"use strict";var a=function(){},b=a.prototype;a.initialize=function(a){a.addEventListener=b.addEventListener,a.on=b.on,a.removeEventListener=a.off=b.removeEventListener,a.removeAllEventListeners=b.removeAllEventListeners,a.hasEventListener=b.hasEventListener,a.dispatchEvent=b.dispatchEvent,a._dispatchEvent=b._dispatchEvent,a.willTrigger=b.willTrigger},b._listeners=null,b._captureListeners=null,b.initialize=function(){},b.addEventListener=function(a,b,c){var d;d=c?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{};var e=d[a];return e&&this.removeEventListener(a,b,c),e=d[a],e?e.push(b):d[a]=[b],b},b.on=function(a,b,c,d,e,f){return b.handleEvent&&(c=c||b,b=b.handleEvent),c=c||this,this.addEventListener(a,function(a){b.call(c,a,e),d&&a.remove()},f)},b.removeEventListener=function(a,b,c){var d=c?this._captureListeners:this._listeners;if(d){var e=d[a];if(e)for(var f=0,g=e.length;g>f;f++)if(e[f]==b){1==g?delete d[a]:e.splice(f,1);break}}},b.off=b.removeEventListener,b.removeAllEventListeners=function(a){a?(this._listeners&&delete this._listeners[a],this._captureListeners&&delete this._captureListeners[a]):this._listeners=this._captureListeners=null},b.dispatchEvent=function(a,b){if("string"==typeof a){var c=this._listeners;if(!c||!c[a])return!1;a=new createjs.Event(a)}if(a.target=b||this,a.bubbles&&this.parent){for(var d=this,e=[d];d.parent;)e.push(d=d.parent);var f,g=e.length;for(f=g-1;f>=0&&!a.propagationStopped;f--)e[f]._dispatchEvent(a,1+(0==f));for(f=1;g>f&&!a.propagationStopped;f++)e[f]._dispatchEvent(a,3)}else this._dispatchEvent(a,2);return a.defaultPrevented},b.hasEventListener=function(a){var b=this._listeners,c=this._captureListeners;return!!(b&&b[a]||c&&c[a])},b.willTrigger=function(a){for(var b=this;b;){if(b.hasEventListener(a))return!0;b=b.parent}return!1},b.toString=function(){return"[EventDispatcher]"},b._dispatchEvent=function(a,b){var c,d=1==b?this._captureListeners:this._listeners;if(a&&d){var e=d[a.type];if(!e||!(c=e.length))return;a.currentTarget=this,a.eventPhase=b,a.removed=!1,e=e.slice();for(var f=0;c>f&&!a.immediatePropagationStopped;f++){var g=e[f];g.handleEvent?g.handleEvent(a):g(a),a.removed&&(this.off(a.type,g,1==b),a.removed=!1)}}},createjs.EventDispatcher=a}(),this.createjs=this.createjs||{},function(){"use strict";var a=function(a,b,c){this.initialize(a,b,c)},b=a.prototype;b.type=null,b.target=null,b.currentTarget=null,b.eventPhase=0,b.bubbles=!1,b.cancelable=!1,b.timeStamp=0,b.defaultPrevented=!1,b.propagationStopped=!1,b.immediatePropagationStopped=!1,b.removed=!1,b.initialize=function(a,b,c){this.type=a,this.bubbles=b,this.cancelable=c,this.timeStamp=(new Date).getTime()},b.preventDefault=function(){this.defaultPrevented=!0},b.stopPropagation=function(){this.propagationStopped=!0},b.stopImmediatePropagation=function(){this.immediatePropagationStopped=this.propagationStopped=!0},b.remove=function(){this.removed=!0},b.clone=function(){return new a(this.type,this.bubbles,this.cancelable)},b.toString=function(){return"[Event (type="+this.type+")]"},createjs.Event=a}(),this.createjs=this.createjs||{},function(){"use strict";createjs.indexOf=function(a,b){for(var c=0,d=a.length;d>c;c++)if(b===a[c])return c;return-1}}(),this.createjs=this.createjs||{},function(){"use strict";createjs.proxy=function(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){return a.apply(b,Array.prototype.slice.call(arguments,0).concat(c))}}}(),this.createjs=this.createjs||{},function(){"use strict";function a(){throw"Sound cannot be instantiated"}function b(a,b){this.init(a,b)}function c(){this.isDefault=!0,this.addEventListener=this.removeEventListener=this.removeAllEventListeners=this.dispatchEvent=this.hasEventListener=this._listeners=this._interrupt=this._playFailed=this.pause=this.resume=this.play=this._beginPlaying=this._cleanUp=this.stop=this.setMasterVolume=this.setVolume=this.mute=this.setMute=this.getMute=this.setPan=this.getPosition=this.setPosition=this.playFailed=function(){return!1},this.getVolume=this.getPan=this.getDuration=function(){return 0},this.playState=a.PLAY_FAILED,this.toString=function(){return"[Sound Default Sound Instance]"}}function d(){}var e=a;e.DELIMITER="|",e.INTERRUPT_ANY="any",e.INTERRUPT_EARLY="early",e.INTERRUPT_LATE="late",e.INTERRUPT_NONE="none",e.PLAY_INITED="playInited",e.PLAY_SUCCEEDED="playSucceeded",e.PLAY_INTERRUPTED="playInterrupted",e.PLAY_FINISHED="playFinished",e.PLAY_FAILED="playFailed",e.SUPPORTED_EXTENSIONS=["mp3","ogg","mpeg","wav","m4a","mp4","aiff","wma","mid"],e.EXTENSION_MAP={m4a:"mp4"},e.FILE_PATTERN=/^(?:(\w+:)\/{2}(\w+(?:\.\w+)*\/?))?([/.]*?(?:[^?]+)?\/)?((?:[^/?]+)\.(\w+))(?:\?(\S+)?)?$/,e.defaultInterruptBehavior=e.INTERRUPT_NONE,e.alternateExtensions=[],e._lastID=0,e.activePlugin=null,e._pluginsRegistered=!1,e._masterVolume=1,e._masterMute=!1,e._instances=[],e._idHash={},e._preloadHash={},e._defaultSoundInstance=null,e.addEventListener=null,e.removeEventListener=null,e.removeAllEventListeners=null,e.dispatchEvent=null,e.hasEventListener=null,e._listeners=null,createjs.EventDispatcher.initialize(e),e._sendFileLoadEvent=function(a){if(e._preloadHash[a])for(var b=0,c=e._preloadHash[a].length;c>b;b++){var d=e._preloadHash[a][b];if(e._preloadHash[a][b]=!0,e.hasEventListener("fileload")){var f=new createjs.Event("fileload");f.src=d.src,f.id=d.id,f.data=d.data,e.dispatchEvent(f)}}},e.getPreloadHandlers=function(){return{callback:createjs.proxy(e.initLoad,e),types:["sound"],extensions:e.SUPPORTED_EXTENSIONS}},e.registerPlugin=function(a){try{console.log("createjs.Sound.registerPlugin has been deprecated. Please use registerPlugins.")}catch(b){}return e._registerPlugin(a)},e._registerPlugin=function(a){return e._pluginsRegistered=!0,null==a?!1:a.isSupported()?(e.activePlugin=new a,!0):!1},e.registerPlugins=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];if(e._registerPlugin(d))return!0}return!1},e.initializeDefaultPlugins=function(){return null!=e.activePlugin?!0:e._pluginsRegistered?!1:e.registerPlugins([createjs.WebAudioPlugin,createjs.HTMLAudioPlugin])?!0:!1},e.isReady=function(){return null!=e.activePlugin},e.getCapabilities=function(){return null==e.activePlugin?null:e.activePlugin._capabilities},e.getCapability=function(a){return null==e.activePlugin?null:e.activePlugin._capabilities[a]},e.initLoad=function(a,b,c,d,f){a=a.replace(f,"");var g=e.registerSound(a,c,d,!1,f);return null==g?!1:g},e.registerSound=function(a,c,d,f,g){if(!e.initializeDefaultPlugins())return!1;if(a instanceof Object&&(g=c,c=a.id,d=a.data,a=a.src),e.alternateExtensions.length)var h=e._parsePath2(a,"sound",c,d);else var h=e._parsePath(a,"sound",c,d);if(null==h)return!1;null!=g&&(a=g+a,h.src=g+h.src),null!=c&&(e._idHash[c]=h.src);var i=null;null!=d&&(isNaN(d.channels)?isNaN(d)||(i=parseInt(d)):i=parseInt(d.channels));var j=e.activePlugin.register(h.src,i);if(null!=j&&(null!=j.numChannels&&(i=j.numChannels),b.create(h.src,i),null!=d&&isNaN(d)?d.channels=h.data.channels=i||b.maxPerChannel():d=h.data=i||b.maxPerChannel(),null!=j.tag?h.tag=j.tag:j.src&&(h.src=j.src),null!=j.completeHandler&&(h.completeHandler=j.completeHandler),j.type&&(h.type=j.type)),0!=f)if(e._preloadHash[h.src]||(e._preloadHash[h.src]=[]),e._preloadHash[h.src].push({src:a,id:c,data:d}),1==e._preloadHash[h.src].length)e.activePlugin.preload(h.src,j);else if(1==e._preloadHash[h.src][0])return!0;return h},e.registerManifest=function(a,b){for(var c=[],d=0,e=a.length;e>d;d++)c[d]=createjs.Sound.registerSound(a[d].src,a[d].id,a[d].data,a[d].preload,b);return c},e.removeSound=function(a,c){if(null==e.activePlugin)return!1;if(a instanceof Object&&(a=a.src),a=e._getSrcById(a),e.alternateExtensions.length)var d=e._parsePath2(a);else var d=e._parsePath(a);if(null==d)return!1;null!=c&&(d.src=c+d.src),a=d.src;for(var f in e._idHash)e._idHash[f]==a&&delete e._idHash[f];return b.removeSrc(a),delete e._preloadHash[a],e.activePlugin.removeSound(a),!0},e.removeManifest=function(a,b){for(var c=[],d=0,e=a.length;e>d;d++)c[d]=createjs.Sound.removeSound(a[d].src,b);return c},e.removeAllSounds=function(){e._idHash={},e._preloadHash={},b.removeAll(),e.activePlugin.removeAllSounds()},e.loadComplete=function(a){if(e.alternateExtensions.length)var b=e._parsePath2(a,"sound");else var b=e._parsePath(a,"sound");return a=b?e._getSrcById(b.src):e._getSrcById(a),1==e._preloadHash[a][0]},e._parsePath=function(a,b,c,d){"string"!=typeof a&&(a=a.toString());var f=a.split(e.DELIMITER);if(f.length>1)try{console.log('createjs.Sound.DELIMITER "|" loading approach has been deprecated. Please use the new alternateExtensions property.')}catch(g){}for(var h={type:b||"sound",id:c,data:d},i=e.getCapabilities(),j=0,k=f.length;k>j;j++){var l=f[j],m=l.match(e.FILE_PATTERN);if(null==m)return!1;var n=m[4],o=m[5];if(i[o]&&createjs.indexOf(e.SUPPORTED_EXTENSIONS,o)>-1)return h.name=n,h.src=l,h.extension=o,h}return null},e._parsePath2=function(a,b,c,d){"string"!=typeof a&&(a=a.toString());var f=a.match(e.FILE_PATTERN);if(null==f)return!1;for(var g=f[4],h=f[5],i=e.getCapabilities(),j=0;!i[h];)if(h=e.alternateExtensions[j++],j>e.alternateExtensions.length)return null;a=a.replace("."+f[5],"."+h);var k={type:b||"sound",id:c,data:d};return k.name=g,k.src=a,k.extension=h,k},e.play=function(a,b,c,d,f,g,h){var i=e.createInstance(a),j=e._playInstance(i,b,c,d,f,g,h);return j||i.playFailed(),i},e.createInstance=function(c){if(!e.initializeDefaultPlugins())return e._defaultSoundInstance;if(c=e._getSrcById(c),e.alternateExtensions.length)var d=e._parsePath2(c,"sound");else var d=e._parsePath(c,"sound");var f=null;return null!=d&&null!=d.src?(b.create(d.src),f=e.activePlugin.create(d.src)):f=a._defaultSoundInstance,f.uniqueId=e._lastID++,f},e.setVolume=function(a){if(null==Number(a))return!1;if(a=Math.max(0,Math.min(1,a)),e._masterVolume=a,!this.activePlugin||!this.activePlugin.setVolume||!this.activePlugin.setVolume(a))for(var b=this._instances,c=0,d=b.length;d>c;c++)b[c].setMasterVolume(a)},e.getVolume=function(){return e._masterVolume},e.setMute=function(a){if(null==a||void 0==a)return!1;if(this._masterMute=a,!this.activePlugin||!this.activePlugin.setMute||!this.activePlugin.setMute(a))for(var b=this._instances,c=0,d=b.length;d>c;c++)b[c].setMasterMute(a);return!0},e.getMute=function(){return this._masterMute},e.stop=function(){for(var a=this._instances,b=a.length;b--;)a[b].stop()},e._playInstance=function(a,b,c,d,f,g,h){if(b instanceof Object&&(c=b.delay,d=b.offset,f=b.loop,g=b.volume,h=b.pan,b=b.interrupt),b=b||e.defaultInterruptBehavior,null==c&&(c=0),null==d&&(d=a.getPosition()),null==f&&(f=0),null==g&&(g=a.volume),null==h&&(h=a.pan),0==c){var i=e._beginPlaying(a,b,d,f,g,h);if(!i)return!1}else{var j=setTimeout(function(){e._beginPlaying(a,b,d,f,g,h)},c);a._delayTimeoutId=j}return this._instances.push(a),!0},e._beginPlaying=function(a,c,d,e,f,g){if(!b.add(a,c))return!1;var h=a._beginPlaying(d,e,f,g);if(!h){var i=createjs.indexOf(this._instances,a);return i>-1&&this._instances.splice(i,1),!1}return!0},e._getSrcById=function(a){return null==e._idHash||null==e._idHash[a]?a:e._idHash[a]},e._playFinished=function(a){b.remove(a);var c=createjs.indexOf(this._instances,a);c>-1&&this._instances.splice(c,1)},createjs.Sound=a,b.channels={},b.create=function(a,c){var d=b.get(a);return null==d?(b.channels[a]=new b(a,c),!0):!1},b.removeSrc=function(a){var c=b.get(a);return null==c?!1:(c.removeAll(),delete b.channels[a],!0)},b.removeAll=function(){for(var a in b.channels)b.channels[a].removeAll();b.channels={}},b.add=function(a,c){var d=b.get(a.src);return null==d?!1:d.add(a,c)},b.remove=function(a){var c=b.get(a.src);return null==c?!1:(c.remove(a),!0)},b.maxPerChannel=function(){return f.maxDefault},b.get=function(a){return b.channels[a]};var f=b.prototype;f.src=null,f.max=null,f.maxDefault=100,f.length=0,f.init=function(a,b){this.src=a,this.max=b||this.maxDefault,-1==this.max&&(this.max=this.maxDefault),this._instances=[]},f.get=function(a){return this._instances[a]},f.add=function(a,b){return this.getSlot(b,a)?(this._instances.push(a),this.length++,!0):!1},f.remove=function(a){var b=createjs.indexOf(this._instances,a);return-1==b?!1:(this._instances.splice(b,1),this.length--,!0)},f.removeAll=function(){for(var a=this.length-1;a>=0;a--)this._instances[a].stop()},f.getSlot=function(b){for(var c,d,e=0,f=this.max;f>e;e++){if(c=this.get(e),null==c)return!0;(b!=a.INTERRUPT_NONE||c.playState==a.PLAY_FINISHED)&&(0!=e?c.playState==a.PLAY_FINISHED||c.playState==a.PLAY_INTERRUPTED||c.playState==a.PLAY_FAILED?d=c:(b==a.INTERRUPT_EARLY&&c.getPosition()d.getPosition())&&(d=c):d=c)}return null!=d?(d._interrupt(),this.remove(d),!0):!1},f.toString=function(){return"[Sound SoundChannel]"},a._defaultSoundInstance=new c,d.init=function(){var a=window.navigator.userAgent;d.isFirefox=a.indexOf("Firefox")>-1,d.isOpera=null!=window.opera,d.isChrome=a.indexOf("Chrome")>-1,d.isIOS=a.indexOf("iPod")>-1||a.indexOf("iPhone")>-1||a.indexOf("iPad")>-1,d.isAndroid=a.indexOf("Android")>-1,d.isBlackberry=a.indexOf("Blackberry")>-1},d.init(),createjs.Sound.BrowserDetect=d}(),this.createjs=this.createjs||{},function(){"use strict";function a(){this._init()}var b=a;b._capabilities=null,b.isSupported=function(){var a=createjs.Sound.BrowserDetect.isIOS||createjs.Sound.BrowserDetect.isAndroid||createjs.Sound.BrowserDetect.isBlackberry;return"file:"!=location.protocol||a||this._isFileXHRSupported()?(b._generateCapabilities(),null==b.context?!1:!0):!1},b._isFileXHRSupported=function(){var a=!0,b=new XMLHttpRequest;try{b.open("GET","fail.fail",!1)}catch(c){return a=!1}b.onerror=function(){a=!1},b.onload=function(){a=404==this.status||200==this.status||0==this.status&&""!=this.response};try{b.send()}catch(c){a=!1}return a},b._generateCapabilities=function(){if(null==b._capabilities){var a=document.createElement("audio");if(null==a.canPlayType)return null;if(window.webkitAudioContext)b.context=new webkitAudioContext;else{if(!window.AudioContext)return null;b.context=new AudioContext}b._compatibilitySetUp(),b.playEmptySound(),b._capabilities={panning:!0,volume:!0,tracks:-1};for(var c=createjs.Sound.SUPPORTED_EXTENSIONS,d=createjs.Sound.EXTENSION_MAP,e=0,f=c.length;f>e;e++){var g=c[e],h=d[g]||g;b._capabilities[g]="no"!=a.canPlayType("audio/"+g)&&""!=a.canPlayType("audio/"+g)||"no"!=a.canPlayType("audio/"+h)&&""!=a.canPlayType("audio/"+h)}b.context.destination.numberOfChannels<2&&(b._capabilities.panning=!1),b.dynamicsCompressorNode=b.context.createDynamicsCompressor(),b.dynamicsCompressorNode.connect(b.context.destination),b.gainNode=b.context.createGain(),b.gainNode.connect(b.dynamicsCompressorNode)}},b._compatibilitySetUp=function(){if(!b.context.createGain){b.context.createGain=b.context.createGainNode;var a=b.context.createBufferSource();a.__proto__.start=a.__proto__.noteGrainOn,a.__proto__.stop=a.__proto__.noteOff,this._panningModel=0}},b.playEmptySound=function(){var a=this.context.createBuffer(1,1,22050),b=this.context.createBufferSource();b.buffer=a,b.connect(this.context.destination),b.start(0,0,0)};var c=a.prototype;c._capabilities=null,c._volume=1,c.context=null,c._panningModel="equalpower",c.dynamicsCompressorNode=null,c.gainNode=null,c._arrayBuffers=null,c._init=function(){this._capabilities=b._capabilities,this._arrayBuffers={},this.context=b.context,this.gainNode=b.gainNode,this.dynamicsCompressorNode=b.dynamicsCompressorNode},c.register=function(a){this._arrayBuffers[a]=!0;var b=new createjs.WebAudioPlugin.Loader(a,this);return{tag:b}},c.isPreloadStarted=function(a){return null!=this._arrayBuffers[a]},c.isPreloadComplete=function(a){return!(null==this._arrayBuffers[a]||1==this._arrayBuffers[a])},c.removeSound=function(a){delete this._arrayBuffers[a]},c.removeAllSounds=function(){this._arrayBuffers={}},c.addPreloadResults=function(a,b){this._arrayBuffers[a]=b},c._handlePreloadComplete=function(){createjs.Sound._sendFileLoadEvent(this.src)},c.preload=function(a){this._arrayBuffers[a]=!0;var b=new createjs.WebAudioPlugin.Loader(a,this);b.onload=this._handlePreloadComplete,b.load()},c.create=function(a){return this.isPreloadStarted(a)||this.preload(a),new createjs.WebAudioPlugin.SoundInstance(a,this)},c.setVolume=function(a){return this._volume=a,this._updateVolume(),!0},c._updateVolume=function(){var a=createjs.Sound._masterMute?0:this._volume;a!=this.gainNode.gain.value&&(this.gainNode.gain.value=a)},c.getVolume=function(){return this._volume},c.setMute=function(){return this._updateVolume(),!0},c.toString=function(){return"[WebAudioPlugin]"},createjs.WebAudioPlugin=a}(),function(){"use strict";function a(a,b){this._init(a,b)}var b=a.prototype=new createjs.EventDispatcher;b.src=null,b.uniqueId=-1,b.playState=null,b._owner=null,b._offset=0,b._delay=0,b._volume=1;try{Object.defineProperty(b,"volume",{get:function(){return this._volume},set:function(a){return null==Number(a)?!1:(a=Math.max(0,Math.min(1,a)),this._volume=a,this._updateVolume(),void 0)}})}catch(c){}b._pan=0;try{Object.defineProperty(b,"pan",{get:function(){return this._pan},set:function(a){return this._owner._capabilities.panning&&null!=Number(a)?(a=Math.max(-1,Math.min(1,a)),this._pan=a,this.panNode.setPosition(a,0,-.5),void 0):!1}})}catch(c){}b._duration=0,b._remainingLoops=0,b._delayTimeoutId=null,b._soundCompleteTimeout=null,b.gainNode=null,b.panNode=null,b.sourceNode=null,b._sourceNodeNext=null,b._muted=!1,b._paused=!1,b._startTime=0,b._endedHandler=null,b._sendEvent=function(a){var b=new createjs.Event(a);this.dispatchEvent(b)},b._init=function(a,b){this._owner=b,this.src=a,this.gainNode=this._owner.context.createGain(),this.panNode=this._owner.context.createPanner(),this.panNode.panningModel=this._owner._panningModel,this.panNode.connect(this.gainNode),this._owner.isPreloadComplete(this.src)&&(this._duration=1e3*this._owner._arrayBuffers[this.src].duration),this._endedHandler=createjs.proxy(this._handleSoundComplete,this)},b._cleanUp=function(){this.sourceNode&&this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this.sourceNode=this._cleanUpAudioNode(this.sourceNode),this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext)),0!=this.gainNode.numberOfOutputs&&this.gainNode.disconnect(0),clearTimeout(this._delayTimeoutId),clearTimeout(this._soundCompleteTimeout),this._startTime=0,null!=window.createjs&&createjs.Sound._playFinished(this)},b._cleanUpAudioNode=function(a){return a&&(a.stop(0),a.disconnect(this.panNode),a=null),a},b._interrupt=function(){this._cleanUp(),this.playState=createjs.Sound.PLAY_INTERRUPTED,this._paused=!1,this._sendEvent("interrupted")},b._handleSoundReady=function(){if(null!=window.createjs){if(1e3*this._offset>this.getDuration())return this.playFailed(),void 0;this._offset<0&&(this._offset=0),this.playState=createjs.Sound.PLAY_SUCCEEDED,this._paused=!1,this.gainNode.connect(this._owner.gainNode);var a=this._owner._arrayBuffers[this.src].duration;this.sourceNode=this._createAndPlayAudioNode(this._owner.context.currentTime-a,this._offset),this._duration=1e3*a,this._startTime=this.sourceNode.startTime-this._offset,this._soundCompleteTimeout=setTimeout(this._endedHandler,1e3*(a-this._offset)),0!=this._remainingLoops&&(this._sourceNodeNext=this._createAndPlayAudioNode(this._startTime,0))}},b._createAndPlayAudioNode=function(a,b){var c=this._owner.context.createBufferSource();return c.buffer=this._owner._arrayBuffers[this.src],c.connect(this.panNode),this._owner.context.currentTime,c.startTime=a+c.buffer.duration,c.start(c.startTime,b,c.buffer.duration-b),c},b.play=function(a,b,c,d,e,f){this._cleanUp(),createjs.Sound._playInstance(this,a,b,c,d,e,f)},b._beginPlaying=function(a,b,c,d){return null!=window.createjs&&this.src?(this._offset=a/1e3,this._remainingLoops=b,this.volume=c,this.pan=d,this._owner.isPreloadComplete(this.src)?(this._handleSoundReady(null),this._sendEvent("succeeded"),1):(this.playFailed(),void 0)):void 0},b.pause=function(){return this._paused||this.playState!=createjs.Sound.PLAY_SUCCEEDED?!1:(this._paused=!0,this._offset=this._owner.context.currentTime-this._startTime,this._cleanUpAudioNode(this.sourceNode),this._cleanUpAudioNode(this._sourceNodeNext),0!=this.gainNode.numberOfOutputs&&this.gainNode.disconnect(),clearTimeout(this._delayTimeoutId),clearTimeout(this._soundCompleteTimeout),!0)},b.resume=function(){return this._paused?(this._handleSoundReady(null),!0):!1},b.stop=function(){return this._cleanUp(),this.playState=createjs.Sound.PLAY_FINISHED,this._offset=0,!0},b.setVolume=function(a){return this.volume=a,!0},b._updateVolume=function(){var a=this._muted?0:this._volume;return a!=this.gainNode.gain.value?(this.gainNode.gain.value=a,!0):!1},b.getVolume=function(){return this.volume},b.setMute=function(a){return null==a||void 0==a?!1:(this._muted=a,this._updateVolume(),!0)},b.getMute=function(){return this._muted},b.setPan=function(a){return this.pan=a,this.pan!=a?!1:void 0},b.getPan=function(){return this.pan},b.getPosition=function(){if(this._paused||null==this.sourceNode)var a=this._offset;else var a=this._owner.context.currentTime-this._startTime;return 1e3*a},b.setPosition=function(a){return this._offset=a/1e3,this.sourceNode&&this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._cleanUpAudioNode(this.sourceNode),this._cleanUpAudioNode(this._sourceNodeNext),clearTimeout(this._soundCompleteTimeout)),this._paused||this.playState!=createjs.Sound.PLAY_SUCCEEDED||this._handleSoundReady(null),!0},b.getDuration=function(){return this._duration},b._handleSoundComplete=function(){return this._offset=0,0!=this._remainingLoops?(this._remainingLoops--,this._sourceNodeNext?(this._cleanUpAudioNode(this.sourceNode),this.sourceNode=this._sourceNodeNext,this._startTime=this.sourceNode.startTime,this._sourceNodeNext=this._createAndPlayAudioNode(this._startTime,0),this._soundCompleteTimeout=setTimeout(this._endedHandler,this._duration)):this._handleSoundReady(null),this._sendEvent("loop"),void 0):(null!=window.createjs&&(this._cleanUp(),this.playState=createjs.Sound.PLAY_FINISHED,this._sendEvent("complete")),void 0)},b.playFailed=function(){null!=window.createjs&&(this._cleanUp(),this.playState=createjs.Sound.PLAY_FAILED,this._sendEvent("failed"))},b.toString=function(){return"[WebAudioPlugin SoundInstance]"},createjs.WebAudioPlugin.SoundInstance=a}(),function(){"use strict";function a(a,b){this._init(a,b)}var b=a.prototype;b.request=null,b.owner=null,b.progress=-1,b.src=null,b.originalSrc=null,b.result=null,b.onload=null,b.onprogress=null,b.onError=null,b._init=function(a,b){this.src=a,this.originalSrc=a,this.owner=b},b.load=function(a){null!=a&&(this.src=a),this.request=new XMLHttpRequest,this.request.open("GET",this.src,!0),this.request.responseType="arraybuffer",this.request.onload=createjs.proxy(this.handleLoad,this),this.request.onError=createjs.proxy(this.handleError,this),this.request.onprogress=createjs.proxy(this.handleProgress,this),this.request.send()},b.handleProgress=function(a,b){this.progress=a/b,null!=this.onprogress&&this.onprogress({loaded:a,total:b,progress:this.progress})},b.handleLoad=function(){this.owner.context.decodeAudioData(this.request.response,createjs.proxy(this.handleAudioDecoded,this),createjs.proxy(this.handleError,this))},b.handleAudioDecoded=function(a){this.progress=1,this.result=a,this.src=this.originalSrc,this.owner.addPreloadResults(this.src,this.result),this.onload&&this.onload()},b.handleError=function(a){this.owner.removeSound(this.src),this.onerror&&this.onerror(a)},b.toString=function(){return"[WebAudioPlugin Loader]"},createjs.WebAudioPlugin.Loader=a}(),this.createjs=this.createjs||{},function(){"use strict";function a(){this._init()}var b=a;b.MAX_INSTANCES=30,b._AUDIO_READY="canplaythrough",b._AUDIO_ENDED="ended",b._AUDIO_SEEKED="seeked",b._AUDIO_STALLED="stalled",b._capabilities=null,b.enableIOS=!1,b.isSupported=function(){if(createjs.Sound.BrowserDetect.isIOS&&!b.enableIOS)return!1;b._generateCapabilities();var a=b.tag;return null==a||null==b._capabilities?!1:!0},b._generateCapabilities=function(){if(null==b._capabilities){var a=b.tag=document.createElement("audio");if(null==a.canPlayType)return null;b._capabilities={panning:!0,volume:!0,tracks:-1};for(var c=createjs.Sound.SUPPORTED_EXTENSIONS,d=createjs.Sound.EXTENSION_MAP,e=0,f=c.length;f>e;e++){var g=c[e],h=d[g]||g;b._capabilities[g]="no"!=a.canPlayType("audio/"+g)&&""!=a.canPlayType("audio/"+g)||"no"!=a.canPlayType("audio/"+h)&&""!=a.canPlayType("audio/"+h)}}};var c=a.prototype;c._capabilities=null,c._audioSources=null,c.defaultNumChannels=2,c.loadedHandler=null,c._init=function(){this._capabilities=b._capabilities,this._audioSources={}},c.register=function(a,b){this._audioSources[a]=!0;for(var c=createjs.HTMLAudioPlugin.TagPool.get(a),d=null,e=b||this.defaultNumChannels,f=0;e>f;f++)d=this._createTag(a),c.add(d);if(d.id=a,this.loadedHandler=createjs.proxy(this._handleTagLoad,this),d.addEventListener&&d.addEventListener("canplaythrough",this.loadedHandler),null==d.onreadystatechange)d.onreadystatechange=this.loadedHandler;else{var g=d.onreadystatechange;d.onreadystatechange=function(){g(),this.loadedHandler()}}return{tag:d,numChannels:e}},c._handleTagLoad=function(a){a.target.removeEventListener&&a.target.removeEventListener("canplaythrough",this.loadedHandler),a.target.onreadystatechange=null,a.target.src!=a.target.id&&createjs.HTMLAudioPlugin.TagPool.checkSrc(a.target.id)},c._createTag=function(a){var b=document.createElement("audio");return b.autoplay=!1,b.preload="none",b.src=a,b},c.removeSound=function(a){delete this._audioSources[a],createjs.HTMLAudioPlugin.TagPool.remove(a)},c.removeAllSounds=function(){this._audioSources={},createjs.HTMLAudioPlugin.TagPool.removeAll()},c.create=function(a){if(!this.isPreloadStarted(a)){var b=createjs.HTMLAudioPlugin.TagPool.get(a),c=this._createTag(a);c.id=a,b.add(c),this.preload(a,{tag:c})}return new createjs.HTMLAudioPlugin.SoundInstance(a,this)},c.isPreloadStarted=function(a){return null!=this._audioSources[a]},c.preload=function(a,b){this._audioSources[a]=!0,new createjs.HTMLAudioPlugin.Loader(a,b.tag)},c.toString=function(){return"[HTMLAudioPlugin]"},createjs.HTMLAudioPlugin=a}(),function(){"use strict";function a(a,b){this._init(a,b)}var b=a.prototype=new createjs.EventDispatcher;b.src=null,b.uniqueId=-1,b.playState=null,b._owner=null,b.loaded=!1,b._offset=0,b._delay=0,b._volume=1;try{Object.defineProperty(b,"volume",{get:function(){return this._volume},set:function(a){null!=Number(a)&&(a=Math.max(0,Math.min(1,a)),this._volume=a,this._updateVolume())}})}catch(c){}b.pan=0,b._duration=0,b._remainingLoops=0,b._delayTimeoutId=null,b.tag=null,b._muted=!1,b._paused=!1,b._endedHandler=null,b._readyHandler=null,b._stalledHandler=null,b.loopHandler=null,b._init=function(a,b){this.src=a,this._owner=b,this._endedHandler=createjs.proxy(this._handleSoundComplete,this),this._readyHandler=createjs.proxy(this._handleSoundReady,this),this._stalledHandler=createjs.proxy(this._handleSoundStalled,this),this.loopHandler=createjs.proxy(this.handleSoundLoop,this)},b._sendEvent=function(a){var b=new createjs.Event(a);this.dispatchEvent(b)},b._cleanUp=function(){var a=this.tag;if(null!=a){a.pause(),a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,this._readyHandler,!1),a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this.loopHandler,!1);try{a.currentTime=0}catch(b){}createjs.HTMLAudioPlugin.TagPool.setInstance(this.src,a),this.tag=null}clearTimeout(this._delayTimeoutId),null!=window.createjs&&createjs.Sound._playFinished(this)},b._interrupt=function(){null!=this.tag&&(this.playState=createjs.Sound.PLAY_INTERRUPTED,this._cleanUp(),this._paused=!1,this._sendEvent("interrupted"))},b.play=function(a,b,c,d,e,f){this._cleanUp(),createjs.Sound._playInstance(this,a,b,c,d,e,f)},b._beginPlaying=function(a,b,c,d){if(null==window.createjs)return-1;var e=this.tag=createjs.HTMLAudioPlugin.TagPool.getInstance(this.src);return null==e?(this.playFailed(),-1):(e.addEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),this._offset=a,this.volume=c,this.pan=d,this._updateVolume(),this._remainingLoops=b,4!==e.readyState?(e.addEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,this._readyHandler,!1),e.addEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED,this._stalledHandler,!1),e.preload="auto",e.load()):this._handleSoundReady(null),this._sendEvent("succeeded"),1)},b._handleSoundStalled=function(){this._cleanUp(),this._sendEvent("failed")},b._handleSoundReady=function(){if(null!=window.createjs){if(this._duration=1e3*this.tag.duration,this.playState=createjs.Sound.PLAY_SUCCEEDED,this._paused=!1,this.tag.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,this._readyHandler,!1),this._offset>=this.getDuration())return this.playFailed(),void 0;this._offset>0&&(this.tag.currentTime=.001*this._offset),-1==this._remainingLoops&&(this.tag.loop=!0),0!=this._remainingLoops&&(this.tag.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this.loopHandler,!1),this.tag.loop=!0),this.tag.play()}},b.pause=function(){return this._paused||this.playState!=createjs.Sound.PLAY_SUCCEEDED||null==this.tag?!1:(this._paused=!0,this.tag.pause(),clearTimeout(this._delayTimeoutId),!0)},b.resume=function(){return this._paused&&null!=this.tag?(this._paused=!1,this.tag.play(),!0):!1},b.stop=function(){return this._offset=0,this.pause(),this.playState=createjs.Sound.PLAY_FINISHED,this._cleanUp(),!0},b.setMasterVolume=function(){return this._updateVolume(),!0},b.setVolume=function(a){return this.volume=a,!0},b._updateVolume=function(){if(null!=this.tag){var a=this._muted||createjs.Sound._masterMute?0:this._volume*createjs.Sound._masterVolume;return a!=this.tag.volume&&(this.tag.volume=a),!0}return!1},b.getVolume=function(){return this.volume},b.setMasterMute=function(){return this._updateVolume(),!0},b.setMute=function(a){return null==a||void 0==a?!1:(this._muted=a,this._updateVolume(),!0)},b.getMute=function(){return this._muted},b.setPan=function(){return!1},b.getPan=function(){return 0},b.getPosition=function(){return null==this.tag?this._offset:1e3*this.tag.currentTime},b.setPosition=function(a){if(null==this.tag)this._offset=a;else{this.tag.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this.loopHandler,!1);try{this.tag.currentTime=.001*a}catch(b){return!1}this.tag.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this.loopHandler,!1)}return!0},b.getDuration=function(){return this._duration},b._handleSoundComplete=function(){this._offset=0,null!=window.createjs&&(this.playState=createjs.Sound.PLAY_FINISHED,this._cleanUp(),this._sendEvent("complete"))},b.handleSoundLoop=function(){this._offset=0,this._remainingLoops--,0==this._remainingLoops&&(this.tag.loop=!1,this.tag.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this.loopHandler,!1)),this._sendEvent("loop")},b.playFailed=function(){null!=window.createjs&&(this.playState=createjs.Sound.PLAY_FAILED,this._cleanUp(),this._sendEvent("failed"))},b.toString=function(){return"[HTMLAudioPlugin SoundInstance]"},createjs.HTMLAudioPlugin.SoundInstance=a}(),function(){"use strict";function a(a,b){this._init(a,b)}var b=a.prototype;b.src=null,b.tag=null,b.preloadTimer=null,b.loadedHandler=null,b._init=function(a,b){if(this.src=a,this.tag=b,this.preloadTimer=setInterval(createjs.proxy(this.preloadTick,this),200),this.loadedHandler=createjs.proxy(this.sendLoadedEvent,this),this.tag.addEventListener&&this.tag.addEventListener("canplaythrough",this.loadedHandler),null==this.tag.onreadystatechange)this.tag.onreadystatechange=createjs.proxy(this.sendLoadedEvent,this);else{var c=this.tag.onreadystatechange;this.tag.onreadystatechange=function(){c(),this.tag.onreadystatechange=createjs.proxy(this.sendLoadedEvent,this)}
+}this.tag.preload="auto",this.tag.load()},b.preloadTick=function(){var a=this.tag.buffered,b=this.tag.duration;a.length>0&&a.end(0)>=b-1&&this.handleTagLoaded()},b.handleTagLoaded=function(){clearInterval(this.preloadTimer)},b.sendLoadedEvent=function(){this.tag.removeEventListener&&this.tag.removeEventListener("canplaythrough",this.loadedHandler),this.tag.onreadystatechange=null,createjs.Sound._sendFileLoadEvent(this.src)},b.toString=function(){return"[HTMLAudioPlugin Loader]"},createjs.HTMLAudioPlugin.Loader=a}(),function(){"use strict";function a(a){this._init(a)}var b=a;b.tags={},b.get=function(c){var d=b.tags[c];return null==d&&(d=b.tags[c]=new a(c)),d},b.remove=function(a){var c=b.tags[a];return null==c?!1:(c.removeAll(),delete b.tags[a],!0)},b.removeAll=function(){for(var a in b.tags)b.tags[a].removeAll();b.tags={}},b.getInstance=function(a){var c=b.tags[a];return null==c?null:c.get()},b.setInstance=function(a,c){var d=b.tags[a];return null==d?null:d.set(c)},b.checkSrc=function(a){var c=b.tags[a];return null==c?null:(c.checkSrcChange(),void 0)};var c=a.prototype;c.src=null,c.length=0,c.available=0,c.tags=null,c._init=function(a){this.src=a,this.tags=[]},c.add=function(a){this.tags.push(a),this.length++,this.available++},c.removeAll=function(){for(;this.length--;)delete this.tags[this.length];this.src=null,this.tags.length=0},c.get=function(){if(0==this.tags.length)return null;this.available=this.tags.length;var a=this.tags.pop();return null==a.parentNode&&document.body.appendChild(a),a},c.set=function(a){var b=createjs.indexOf(this.tags,a);-1==b&&this.tags.push(a),this.available=this.tags.length},c.checkSrcChange=function(){for(var a=this.tags.length-1,b=this.tags[a].src;a--;)this.tags[a].src=b},c.toString=function(){return"[HTMLAudioPlugin TagPool]"},createjs.HTMLAudioPlugin.TagPool=a}();
\ No newline at end of file
diff --git a/legacy/swfobject.js b/legacy/swfobject.js
new file mode 100644
index 0000000..8eafe9d
--- /dev/null
+++ b/legacy/swfobject.js
@@ -0,0 +1,4 @@
+/* SWFObject v2.2
+ is released under the MIT License
+*/
+var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad '}}aa.outerHTML='"+af+" ";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab
Date: Tue, 30 Dec 2025 22:28:34 +0000
Subject: [PATCH 04/14] a
---
legacy/legacy.js | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/legacy/legacy.js b/legacy/legacy.js
index ea38154..7942510 100644
--- a/legacy/legacy.js
+++ b/legacy/legacy.js
@@ -99,6 +99,25 @@ $(document).ready(function () {
// Basic check for audio support
if (domPlayer && typeof domPlayer.play === 'function') {
+
+ // Explicitly check for Codec support
+ if (quality === "LOSSLESS") {
+ // FLAC check
+ var canPlay = "";
+ try {
+ canPlay = domPlayer.canPlayType("audio/flac");
+ } catch(e) {}
+
+ if (canPlay === "" || canPlay === "no") {
+ console.log("Browser reports no FLAC support. Fallback to AAC.");
+ // Directly fallback to AAC
+ if (!attemptFallback) {
+ window.playTrack(id, true);
+ return;
+ }
+ }
+ }
+
updateStatus("Starting Native Playback" + qLabel + "...");
// Set error handler for THIS attempt
@@ -121,7 +140,7 @@ $(document).ready(function () {
.catch(function(e) {
console.log("Native Play Promise Rejected: " + e.name);
// Auto-play policy or format issue?
- // Try SounJS as fallback
+ // Try SoundJS as fallback
playLegacySoundJS(url, id, quality);
});
} else {
From 56b5cbedf963f765cf783001fc37043bc2501257 Mon Sep 17 00:00:00 2001
From: uimaxbai <61615730+uimaxbai@users.noreply.github.com>
Date: Wed, 31 Dec 2025 11:00:08 +0000
Subject: [PATCH 05/14] add http fallback for audio playback
---
legacy/legacy.js | 69 +++++++++++++++++++++++++++++++++++++++---------
1 file changed, 56 insertions(+), 13 deletions(-)
diff --git a/legacy/legacy.js b/legacy/legacy.js
index 7942510..623147e 100644
--- a/legacy/legacy.js
+++ b/legacy/legacy.js
@@ -90,7 +90,7 @@ $(document).ready(function () {
}
);
- function playNativeFirst(url, id, quality) {
+ function playNativeFirst(url, id, quality, isRetry) {
var domPlayer = $("#audio-player")[0];
// Quality Label
@@ -118,14 +118,33 @@ $(document).ready(function () {
}
}
- updateStatus("Starting Native Playback" + qLabel + "...");
+ updateStatus("Starting Native Playback" + qLabel + ((isRetry) ? " (HTTP)..." : "..."));
// Set error handler for THIS attempt
domPlayer.onerror = function() {
var errCode = domPlayer.error ? domPlayer.error.code : 0;
console.log("Native Error Code: " + errCode);
+
+ // Try HTTP fallback if SSL failed
+ if (!isRetry && url.indexOf("https://") === 0) {
+ console.log("HTTPS failed, retrying with HTTP...");
+ var httpUrl = "http://" + url.substring(8);
+ playNativeFirst(httpUrl, id, quality, true);
+ return;
+ }
+
// Fallback to legacy
- playLegacySoundJS(url, id, quality);
+ // We pass the ORIGINAL url (let SoundJS try HTTPS first too)
+ // Or maybe we pass the current one?
+ // Let's pass the Original HTTPS one to start the cycle fresh.
+ // Assuming 'streamUrl' from closure is the original.
+ // But we don't have access to it easily if we are deep in recursion?
+ // Actually 'url' arg might be HTTP now.
+ // Let's just pass 'url' - if it worked for HTTP, SoundJS might like HTTP.
+ // But better to reset protocol for SoundJS?
+ // Let's use the valid streamUrl from outer scope?
+ // Variable 'streamUrl' is available in closure!
+ playLegacySoundJS(streamUrl, id, quality);
};
try {
@@ -139,9 +158,18 @@ $(document).ready(function () {
})
.catch(function(e) {
console.log("Native Play Promise Rejected: " + e.name);
- // Auto-play policy or format issue?
- // Try SoundJS as fallback
- playLegacySoundJS(url, id, quality);
+ // Retry HTTP logic here too?
+ // Promise rejection is usually Autoplay or Format, not Network (Network is onerror).
+ // But maybe SSL error causes rejection?
+ // Let's allow retry here too just in case.
+ if (!isRetry && url.indexOf("https://") === 0) {
+ console.log("HTTPS promise rejected, retrying HTTP...");
+ var httpUrl = "http://" + url.substring(8);
+ playNativeFirst(httpUrl, id, quality, true);
+ return;
+ }
+
+ playLegacySoundJS(streamUrl, id, quality);
});
} else {
// Legacy browser (no promise), assume success unless onError fires
@@ -149,17 +177,22 @@ $(document).ready(function () {
}
} catch (e) {
console.log("Native Exception: " + e.message);
- playLegacySoundJS(url, id, quality);
+ if (!isRetry && url.indexOf("https://") === 0) {
+ var httpUrl = "http://" + url.substring(8);
+ playNativeFirst(httpUrl, id, quality, true);
+ return;
+ }
+ playLegacySoundJS(streamUrl, id, quality);
}
} else {
// No native audio support (IE < 9)
- playLegacySoundJS(url, id, quality);
+ playLegacySoundJS(streamUrl, id, quality);
}
}
- function playLegacySoundJS(url, id, quality) {
- updateStatus("Activating Legacy Player (Flash)...");
+ function playLegacySoundJS(url, id, quality, isRetry) {
+ updateStatus("Activating Legacy Player (Flash)" + ((isRetry) ? " (HTTP)..." : "..."));
// SoundJS Logic
var soundJsUrl = url;
@@ -179,13 +212,13 @@ $(document).ready(function () {
}
}
- var soundId = "track_" + id + "_" + quality;
+ var soundId = "track_" + id + "_" + quality + (isRetry ? "_http" : "");
createjs.Sound.removeAllEventListeners("fileload");
var playSound = function() {
var instance = createjs.Sound.play(soundId);
if (!instance || instance.playState === createjs.Sound.PLAY_FAILED) {
- handleError("Legacy Playback Failed");
+ handleLegacyError("Legacy Playback Failed");
} else {
updateStatus("Now Playing via Flash/Legacy...");
}
@@ -200,7 +233,17 @@ $(document).ready(function () {
try {
createjs.Sound.registerSound(soundJsUrl, soundId);
} catch(e) {
- handleError("Legacy Setup Failed: " + e.message);
+ handleLegacyError("Legacy Setup Failed: " + e.message);
+ }
+
+ function handleLegacyError(msg) {
+ if (!isRetry && url.indexOf("https://") === 0) {
+ console.log("Legacy HTTPS failed ("+msg+"), retrying HTTP...");
+ var httpUrl = "http://" + url.substring(8);
+ playLegacySoundJS(httpUrl, id, quality, true);
+ return;
+ }
+ handleError(msg);
}
}
From c93801441a8fa6ebdc687c32542623fee4d5be3f Mon Sep 17 00:00:00 2001
From: uimaxbai <61615730+uimaxbai@users.noreply.github.com>
Date: Wed, 31 Dec 2025 11:23:13 +0000
Subject: [PATCH 06/14] probe for https
---
legacy/legacy.js | 141 +++++++++++++++++++++++++++++++++--------------
1 file changed, 101 insertions(+), 40 deletions(-)
diff --git a/legacy/legacy.js b/legacy/legacy.js
index 623147e..271ad49 100644
--- a/legacy/legacy.js
+++ b/legacy/legacy.js
@@ -23,10 +23,67 @@ $(document).ready(function () {
createjs.Sound.registerPlugins([createjs.HTMLAudioPlugin, createjs.WebAudioPlugin, createjs.FlashPlugin]);
// Initial Load
- fetchInstances(function () {
- loadRecentTracks();
+ // Run HTTPS probe first
+ checkHttpsSupport(function() {
+ fetchInstances(function () {
+ loadRecentTracks();
+ });
});
+ function checkHttpsSupport(callback) {
+ if (window.location.protocol === "http:") {
+ // If we are already on HTTP, we might want to check if HTTPS is possible?
+ // Or just assume if user loaded via HTTP, we might need HTTP for APIs too.
+ // But user might be on HTTP because they typed it, but API supports HTTPS.
+ // Let's Probe.
+ // However, if we are on HTTPS, mixed content blocking might prevent HTTP fallback checking?
+ // Actually, we want to know if Client supports HTTPS.
+ }
+
+ // Probe a known HTTPS endpoint (one of our instances)
+ // Use a known stable one, or just try the first instance later?
+ // Better to fail fast now.
+ var probeUrl = "https://tidal.kinoplus.online/";
+
+ console.log("Probing HTTPS support...");
+
+ var probeSuccess = false;
+ var probeFinished = false;
+
+ function finishProbe(success) {
+ if (probeFinished) return;
+ probeFinished = true;
+ if (success) {
+ console.log("HTTPS Probe Successful.");
+ isHttpFallback = false;
+ } else {
+ console.log("HTTPS Probe Failed. Defaulting to HTTP fallback.");
+ isHttpFallback = true;
+ }
+ callback();
+ }
+
+ var timeout = setTimeout(function() {
+ finishProbe(false);
+ }, 5000); // 3s timeout for HTTPS check
+
+ try {
+ $.ajax({
+ url: probeUrl,
+ dataType: "json",
+ timeout: 2500, // jQuery timeout
+ success: function() {
+ finishProbe(true);
+ },
+ error: function() {
+ finishProbe(false); // XHR Error or Timeout
+ }
+ });
+ } catch(e) {
+ finishProbe(false);
+ }
+ }
+
// Event Bindings
$("#btn-home").click(function (e) {
e.preventDefault();
@@ -92,6 +149,7 @@ $(document).ready(function () {
function playNativeFirst(url, id, quality, isRetry) {
var domPlayer = $("#audio-player")[0];
+ var playbackTimer = null;
// Quality Label
var qLabel = (quality === "LOSSLESS") ? " (FLAC)" : " (AAC)";
@@ -110,7 +168,6 @@ $(document).ready(function () {
if (canPlay === "" || canPlay === "no") {
console.log("Browser reports no FLAC support. Fallback to AAC.");
- // Directly fallback to AAC
if (!attemptFallback) {
window.playTrack(id, true);
return;
@@ -120,69 +177,73 @@ $(document).ready(function () {
updateStatus("Starting Native Playback" + qLabel + ((isRetry) ? " (HTTP)..." : "..."));
- // Set error handler for THIS attempt
- domPlayer.onerror = function() {
- var errCode = domPlayer.error ? domPlayer.error.code : 0;
- console.log("Native Error Code: " + errCode);
+ // Helper to handle retry vs legacy fallback
+ function triggerRetryOrLegacy(msg) {
+ if (playbackTimer) {
+ clearTimeout(playbackTimer);
+ playbackTimer = null;
+ }
// Try HTTP fallback if SSL failed
if (!isRetry && url.indexOf("https://") === 0) {
- console.log("HTTPS failed, retrying with HTTP...");
+ console.log("HTTPS failed/timeout (" + msg + "), retrying with HTTP...");
var httpUrl = "http://" + url.substring(8);
playNativeFirst(httpUrl, id, quality, true);
return;
}
- // Fallback to legacy
- // We pass the ORIGINAL url (let SoundJS try HTTPS first too)
- // Or maybe we pass the current one?
- // Let's pass the Original HTTPS one to start the cycle fresh.
- // Assuming 'streamUrl' from closure is the original.
- // But we don't have access to it easily if we are deep in recursion?
- // Actually 'url' arg might be HTTP now.
- // Let's just pass 'url' - if it worked for HTTP, SoundJS might like HTTP.
- // But better to reset protocol for SoundJS?
- // Let's use the valid streamUrl from outer scope?
- // Variable 'streamUrl' is available in closure!
playLegacySoundJS(streamUrl, id, quality);
+ }
+
+ // Set error handler for THIS attempt
+ domPlayer.onerror = function() {
+ var errCode = domPlayer.error ? domPlayer.error.code : 0;
+ console.log("Native Error Code: " + errCode);
+ triggerRetryOrLegacy("onerror: " + errCode);
};
try {
domPlayer.src = url;
var playPromise = domPlayer.play();
+ // Set a safety timeout for "forever pending" requests (common in Chrome 15 with SSL issues)
+ playbackTimer = setTimeout(function() {
+ console.log("Playback timeout - stalling detected.");
+ triggerRetryOrLegacy("timeout");
+ }, 5000); // 5 seconds to start playing
+
+ // If playback starts, clear timeout
+ domPlayer.onplaying = function() {
+ if (playbackTimer) {
+ clearTimeout(playbackTimer);
+ playbackTimer = null;
+ }
+ updateStatus("Now Playing..." + qLabel);
+ };
+
if (playPromise !== undefined) {
playPromise
.then(function() {
- updateStatus("Now Playing..." + qLabel);
+ // Promise resolved doesn't always mean playing started (buffering)
+ // But usually it means intent is accepted.
+ // We keep timer running until 'onplaying' checks in?
+ // Actually promise resolve just means "accepted".
+ // Chrome 15 won't have promise.
+ // Modern browsers: resolve -> wait for data -> playing.
+ // If data hangs, promise resolved but playing never fires.
+ // So we keep timer.
})
.catch(function(e) {
console.log("Native Play Promise Rejected: " + e.name);
- // Retry HTTP logic here too?
- // Promise rejection is usually Autoplay or Format, not Network (Network is onerror).
- // But maybe SSL error causes rejection?
- // Let's allow retry here too just in case.
- if (!isRetry && url.indexOf("https://") === 0) {
- console.log("HTTPS promise rejected, retrying HTTP...");
- var httpUrl = "http://" + url.substring(8);
- playNativeFirst(httpUrl, id, quality, true);
- return;
- }
-
- playLegacySoundJS(streamUrl, id, quality);
+ triggerRetryOrLegacy("promise rejection: " + e.name);
});
} else {
- // Legacy browser (no promise), assume success unless onError fires
- updateStatus("Now Playing..." + qLabel);
+ // Legacy browser (no promise)
+ // Wait for onplaying or timeout
}
} catch (e) {
console.log("Native Exception: " + e.message);
- if (!isRetry && url.indexOf("https://") === 0) {
- var httpUrl = "http://" + url.substring(8);
- playNativeFirst(httpUrl, id, quality, true);
- return;
- }
- playLegacySoundJS(streamUrl, id, quality);
+ triggerRetryOrLegacy("exception: " + e.message);
}
} else {
From 66f9072cca30d95556ccf6a4ab5e14f42997d68f Mon Sep 17 00:00:00 2001
From: uimaxbai <61615730+uimaxbai@users.noreply.github.com>
Date: Wed, 31 Dec 2025 11:30:34 +0000
Subject: [PATCH 07/14] a
---
legacy/legacy.js | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/legacy/legacy.js b/legacy/legacy.js
index 271ad49..2fd2da5 100644
--- a/legacy/legacy.js
+++ b/legacy/legacy.js
@@ -18,9 +18,11 @@ $(document).ready(function () {
// Initialize SoundJS
// Note: Class is FlashPlugin in 0.5.2, but SWF is FlashAudioPlugin.swf
createjs.FlashPlugin.swfPath = "./";
- // Prioritize HTMLAudio -> WebAudio -> Flash
- // HTMLAudio is better for streaming music (avoids XHR/CORS issues of WebAudio)
- createjs.Sound.registerPlugins([createjs.HTMLAudioPlugin, createjs.WebAudioPlugin, createjs.FlashPlugin]);
+ // Custom Architecture:
+ // We handle HTML5 Audio manually via playNativeFirst() for full control (UI, timeouts, hacks).
+ // SoundJS is reserved STRICTLY for Flash fallback on legacy browsers (IE, old Chrome).
+ // Therefore, we ONLY register the FlashPlugin.
+ createjs.Sound.registerPlugins([createjs.FlashPlugin]);
// Initial Load
// Run HTTPS probe first
@@ -204,6 +206,9 @@ $(document).ready(function () {
try {
domPlayer.src = url;
+ domPlayer.preload = "auto";
+ domPlayer.load(); // Force reload/buffering
+
var playPromise = domPlayer.play();
// Set a safety timeout for "forever pending" requests (common in Chrome 15 with SSL issues)
From 42e16cb8f867be29403ddf4dc7835674f2789e2c Mon Sep 17 00:00:00 2001
From: uimaxbai <61615730+uimaxbai@users.noreply.github.com>
Date: Wed, 31 Dec 2025 13:36:01 +0000
Subject: [PATCH 08/14] add html5 version of site to appease certain browsers
---
legacy/html5.html | 122 +++++++++
legacy/html5.js | 627 ++++++++++++++++++++++++++++++++++++++++++++++
legacy/index.html | 192 +++++++++-----
legacy/legacy.js | 51 ++++
4 files changed, 924 insertions(+), 68 deletions(-)
create mode 100644 legacy/html5.html
create mode 100644 legacy/html5.js
diff --git a/legacy/html5.html b/legacy/html5.html
new file mode 100644
index 0000000..dfbd92b
--- /dev/null
+++ b/legacy/html5.html
@@ -0,0 +1,122 @@
+
+
+
+ Monochrome Legacy (HTML5)
+
+
+
+
+
+
+
+
+
+
+ Monochrome Music
+ music
+
+
+
+
+
+
+ Welcome to Monochrome Music Legacy Edition check out the latest
+ hits new songs added daily under construction sign
+ guestbook
+
+
+
+
+
+
+
+
+ Menu
+
+
+
+
+
+
+
+
+ Free and open software
+ made by binimum
+ all browsers that support
+ aac audio (may work in
+ unsupported browsers with adobe flash) or
+ flac audio should
+ work
+
+
+
+
+
+
+
+
+
+ Status: Ready to play.
+
+
+
+ Your browser does not support the audio element.
+
+
+
+
+
+ Search Music:
+
+
+
+
+
Loading...
+
+
+
+
+
+
+
diff --git a/legacy/html5.js b/legacy/html5.js
new file mode 100644
index 0000000..beb665c
--- /dev/null
+++ b/legacy/html5.js
@@ -0,0 +1,627 @@
+// jQuery 1.12.4 Legacy Support
+$(document).ready(function () {
+ // CORS Support for IE8/9 (XDomainRequest)
+ // Required because IE8/9 do not support CORS via standard XMLHttpRequest
+ if (window.XDomainRequest) {
+ $.ajaxTransport(function(s) {
+ if (s.crossDomain && s.async) {
+ if (s.timeout) {
+ s.xdrTimeout = s.timeout;
+ delete s.timeout;
+ }
+ var xdr;
+ return {
+ send: function(_, complete) {
+ function callback(status, statusText, responses, responseHeaders) {
+ xdr.onload = xdr.onerror = xdr.ontimeout = $.noop;
+ xdr = undefined;
+ complete(status, statusText, responses, responseHeaders);
+ }
+ xdr = new XDomainRequest();
+ try {
+ xdr.open(s.type, s.url);
+ xdr.onload = function() {
+ callback(200, "OK", { text: xdr.responseText }, "Content-Type: " + xdr.contentType);
+ };
+ xdr.onerror = function() {
+ callback(404, "Not Found");
+ };
+ xdr.ontimeout = function() {
+ callback(0, "timeout");
+ };
+ xdr.timeout = s.xdrTimeout || Number.MAX_VALUE;
+ xdr.send((s.hasContent && s.data) || null);
+ } catch(e) {
+ // Protocol Mismatch generally throws here in IE
+ callback(500, "Protocol/Access Error", { text: e.message });
+ }
+ },
+ abort: function() {
+ if (xdr) {
+ xdr.onerror = $.noop;
+ xdr.abort();
+ }
+ }
+ };
+ }
+ });
+ }
+ // Enable CORS logic in jQuery generally (if supported by this jQuery version)
+ if ($.support) {
+ $.support.cors = true;
+ }
+
+ var apiInstances = [];
+ var currentInstanceIndex = 0;
+ var isHttpFallback = false;
+ var FALLBACK_INSTANCES = [
+ "https://wolf.qqdl.site",
+ "https://maus.qqdl.site",
+ "https://vogel.qqdl.site",
+ "https://katze.qqdl.site",
+ "https://hund.qqdl.site",
+ "https://tidal.kinoplus.online",
+ "https://tidal-api.binimum.org",
+ ];
+ var audioPlayer = $("#audio-player")[0];
+ var currentTrackInfo = $("#now-playing-info");
+
+ // HTML5 Version - No Flash/SoundJS (Cleared)
+
+ // Initial Load
+ // Run HTTPS probe first
+ checkHttpsSupport(function() {
+ fetchInstances(function () {
+ loadRecentTracks();
+ });
+ });
+
+ function checkHttpsSupport(callback) {
+ if (window.location.protocol === "http:") {
+ // If we are already on HTTP, we might want to check if HTTPS is possible?
+ // Or just assume if user loaded via HTTP, we might need HTTP for APIs too.
+ // But user might be on HTTP because they typed it, but API supports HTTPS.
+ // Let's Probe.
+ // However, if we are on HTTPS, mixed content blocking might prevent HTTP fallback checking?
+ // Actually, we want to know if Client supports HTTPS.
+ }
+
+ // Probe a known HTTPS endpoint (one of our instances)
+ // Use a known stable one, or just try the first instance later?
+ // Better to fail fast now.
+ var probeUrl = "https://tidal.kinoplus.online/";
+
+ console.log("Probing HTTPS support...");
+
+ var probeSuccess = false;
+ var probeFinished = false;
+
+ function finishProbe(success) {
+ if (probeFinished) return;
+ probeFinished = true;
+ if (success) {
+ console.log("HTTPS Probe Successful.");
+ isHttpFallback = false;
+ } else {
+ console.log("HTTPS Probe Failed. Defaulting to HTTP fallback.");
+ isHttpFallback = true;
+ }
+ callback();
+ }
+
+ var timeout = setTimeout(function() {
+ finishProbe(false);
+ }, 5000); // 3s timeout for HTTPS check
+
+ try {
+ $.ajax({
+ url: probeUrl,
+ dataType: "json",
+ timeout: 2500, // jQuery timeout
+ success: function() {
+ finishProbe(true);
+ },
+ error: function() {
+ finishProbe(false); // XHR Error or Timeout
+ }
+ });
+ } catch(e) {
+ finishProbe(false);
+ }
+ }
+
+ // Event Bindings
+ $("#btn-home").click(function (e) {
+ e.preventDefault();
+ loadRecentTracks();
+ });
+
+ $("#search-form").submit(function (e) {
+ e.preventDefault();
+ var query = $("#search-input").val();
+ performSearch(query);
+ });
+
+ // Global functions exposed for inline onclicks
+ // Global functions exposed for inline onclicks
+ // Global Stop function to prevent overlap
+ function stopAllAudio() {
+ // 1. Stop SoundJS (Removed in HTML5 ver)
+
+ // 2. Stop DOM Player
+ if (audioPlayer) {
+ try {
+ audioPlayer.pause();
+ audioPlayer.currentTime = 0;
+ // Don't clear src immediately as it might flash, just pause.
+ } catch(e) { }
+ }
+ }
+
+ window.playTrack = function (id, attemptFallback) {
+ var quality = attemptFallback ? "HIGH" : "LOSSLESS";
+ apiRequest(
+ "/track/?id=" + id + "&quality=" + quality,
+ function (data) {
+ if (data && data.data && data.data.manifest) {
+ try {
+ var manifestStr = base64Decode(data.data.manifest);
+ var manifest = JSON.parse(manifestStr);
+ if (manifest.urls && manifest.urls.length > 0) {
+ var streamUrl = manifest.urls[0];
+
+ // Unified Playback Strategy:
+ // 1. Stop Everything
+ stopAllAudio();
+
+ // 2. Try Native DOM Player (Visible Interface)
+ // If this works, user gets controls. If it fails (IE), we fallback to SoundJS.
+ playNativeFirst(streamUrl, id, quality);
+ }
+ } catch (e) {
+ console.log("Manifest error: " + e);
+ }
+ } else {
+ handleError("Invalid track data");
+ }
+ },
+ function (err) {
+ handleError(err);
+ }
+ );
+
+ function playNativeFirst(url, id, quality, isRetry) {
+ var domPlayer = $("#audio-player")[0];
+ var playbackTimer = null;
+
+ // Quality Label
+ var qLabel = (quality === "LOSSLESS") ? " (FLAC)" : " (AAC)";
+ if (attemptFallback) qLabel = " (AAC)";
+
+ // Basic check for audio support
+ if (domPlayer && typeof domPlayer.play === 'function') {
+
+ // Explicitly check for Codec support
+ if (quality === "LOSSLESS") {
+ // FLAC check
+ var canPlay = "";
+ try {
+ canPlay = domPlayer.canPlayType("audio/flac");
+ } catch(e) {}
+
+ if (canPlay === "" || canPlay === "no") {
+ console.log("Browser reports no FLAC support. Fallback to AAC.");
+ if (!attemptFallback) {
+ window.playTrack(id, true);
+ return;
+ }
+ }
+ }
+
+ updateStatus("Starting Native Playback" + qLabel + ((isRetry) ? " (HTTP)..." : "..."));
+
+ // Helper to handle retry vs legacy fallback
+ function triggerRetryOrLegacy(msg) {
+ if (playbackTimer) {
+ clearTimeout(playbackTimer);
+ playbackTimer = null;
+ }
+
+ // Try HTTP fallback if SSL failed
+ if (!isRetry && url.indexOf("https://") === 0) {
+ console.log("HTTPS failed/timeout (" + msg + "), retrying with HTTP...");
+ var httpUrl = "http://" + url.substring(8);
+ playNativeFirst(httpUrl, id, quality, true);
+ return;
+ }
+
+ // If native fails on HTML5 site, we have no Flash fallback.
+ handleError("Playback Failed - No Flash Fallback Available (" + msg + ")");
+ }
+
+ // Set error handler for THIS attempt
+ domPlayer.onerror = function() {
+ var errCode = domPlayer.error ? domPlayer.error.code : 0;
+ console.log("Native Error Code: " + errCode);
+ triggerRetryOrLegacy("onerror: " + errCode);
+ };
+
+ try {
+ domPlayer.src = url;
+ domPlayer.preload = "auto";
+ domPlayer.load(); // Force reload/buffering
+
+ var playPromise = domPlayer.play();
+
+ // Set a safety timeout for "forever pending" requests (common in Chrome 15 with SSL issues)
+ playbackTimer = setTimeout(function() {
+ console.log("Playback timeout - stalling detected.");
+ triggerRetryOrLegacy("timeout");
+ }, 5000); // 5 seconds to start playing
+
+ // If playback starts, clear timeout
+ domPlayer.onplaying = function() {
+ if (playbackTimer) {
+ clearTimeout(playbackTimer);
+ playbackTimer = null;
+ }
+ updateStatus("Now Playing..." + qLabel);
+ };
+
+ if (playPromise !== undefined) {
+ playPromise
+ .then(function() {
+ // Promise resolved doesn't always mean playing started (buffering)
+ // But usually it means intent is accepted.
+ // We keep timer running until 'onplaying' checks in?
+ // Actually promise resolve just means "accepted".
+ // Chrome 15 won't have promise.
+ // Modern browsers: resolve -> wait for data -> playing.
+ // If data hangs, promise resolved but playing never fires.
+ // So we keep timer.
+ })
+ .catch(function(e) {
+ console.log("Native Play Promise Rejected: " + e.name);
+ triggerRetryOrLegacy("promise rejection: " + e.name);
+ });
+ } else {
+ // Legacy browser (no promise)
+ // Wait for onplaying or timeout
+ }
+ } catch (e) {
+ console.log("Native Exception: " + e.message);
+ triggerRetryOrLegacy("exception: " + e.message);
+ }
+
+ } else {
+ // No native audio support (IE < 9)
+ playLegacySoundJS(streamUrl, id, quality);
+ }
+ }
+
+ function playLegacySoundJS(url, id, quality, isRetry) {
+ updateStatus("Activating Legacy Player (Flash)" + ((isRetry) ? " (HTTP)..." : "..."));
+
+ // SoundJS Logic
+ var soundJsUrl = url;
+ // Hint extension for SoundJS
+ if (soundJsUrl.indexOf(".mp3") === -1 && soundJsUrl.indexOf(".m4a") === -1) {
+ soundJsUrl += "#.m4a"; // Default to AAC hint
+ }
+
+ // If FLAC and we are here, SoundJS will likely fail, but we'll try or alert.
+ if (quality === "LOSSLESS") {
+ // SoundJS can't do FLAC. And if native failed, we are out of luck for FLAC.
+ // Try falling back to AAC quality for the whole track?
+ if (!attemptFallback) {
+ console.log("FLAC failed native, switching to HIGH quality fallback...");
+ window.playTrack(id, true);
+ return;
+ }
+ }
+
+ var soundId = "track_" + id + "_" + quality + (isRetry ? "_http" : "");
+ createjs.Sound.removeAllEventListeners("fileload");
+
+ var playSound = function() {
+ var instance = createjs.Sound.play(soundId);
+ if (!instance || instance.playState === createjs.Sound.PLAY_FAILED) {
+ handleLegacyError("Legacy Playback Failed");
+ } else {
+ updateStatus("Now Playing via Flash/Legacy...");
+ }
+ };
+
+ createjs.Sound.addEventListener("fileload", function(event) {
+ if (event.id === soundId) {
+ playSound();
+ }
+ });
+
+ try {
+ createjs.Sound.registerSound(soundJsUrl, soundId);
+ } catch(e) {
+ handleLegacyError("Legacy Setup Failed: " + e.message);
+ }
+
+ function handleLegacyError(msg) {
+ if (!isRetry && url.indexOf("https://") === 0) {
+ console.log("Legacy HTTPS failed ("+msg+"), retrying HTTP...");
+ var httpUrl = "http://" + url.substring(8);
+ playLegacySoundJS(httpUrl, id, quality, true);
+ return;
+ }
+ handleError(msg);
+ }
+ }
+
+ function updateStatus(msg) {
+ if (currentTrackInfo.length) {
+ currentTrackInfo.html(msg);
+ }
+ }
+
+ function handleError(msg) {
+ if (!attemptFallback) {
+ window.playTrack(id, true);
+ } else {
+ // alert("Playback Error: " + (msg || "Unknown"));
+ updateStatus("Error: " + msg);
+ }
+ }
+ };
+
+ function loadRecentTracks() {
+ setContent("Loading recent tracks...");
+ apiRequest(
+ "/search/?s=a&limit=20",
+ function (data) {
+ if (data && data.data && data.data.items) {
+ renderTracks(data.data.items, "Recently Added / Popular");
+ } else {
+ setContent("No recent tracks found.");
+ }
+ },
+ function (err) {
+ setContent("Error loading tracks: " + err);
+ }
+ );
+ }
+
+ function fetchInstances(callback) {
+ // using $.ajax directly to handle errors robustly
+ $.ajax({
+ url: "/instances.json",
+ dataType: "json",
+ success: function (instances) {
+ if (instances && instances.length > 0) {
+ apiInstances = shuffleArray(instances);
+ // Clean URLs
+ for (var i = 0; i < apiInstances.length; i++) {
+ if (apiInstances[i].charAt(apiInstances[i].length - 1) === "/") {
+ apiInstances[i] = apiInstances[i].substring(0, apiInstances[i].length - 1);
+ }
+ }
+ currentInstanceIndex = 0;
+ callback();
+ } else {
+ useFallback(callback);
+ }
+ },
+ error: function () {
+ useFallback(callback);
+ }
+ });
+ }
+
+ function useFallback(callback) {
+ apiInstances = shuffleArray(FALLBACK_INSTANCES.slice()); // Copy and shuffle
+ currentInstanceIndex = 0;
+ callback();
+ }
+
+ function shuffleArray(array) {
+ for (var i = array.length - 1; i > 0; i--) {
+ var j = Math.floor(Math.random() * (i + 1));
+ var temp = array[i];
+ array[i] = array[j];
+ array[j] = temp;
+ }
+ return array;
+ }
+
+ function performSearch(query) {
+ var resultsDiv = $("#search-results");
+ if (resultsDiv.length === 0) {
+ setContent('Searching...
');
+ resultsDiv = $("#search-results");
+ } else {
+ resultsDiv.html("Searching...");
+ }
+
+ apiRequest(
+ "/search/?s=" + encodeURIComponent(query) + "&limit=25",
+ function (data) {
+ var tracks = (data && data.data && data.data.items) ? data.data.items : [];
+ if (tracks.length === 0) {
+ resultsDiv.html("No results found.");
+ return;
+ }
+
+ var html =
+ '';
+ html +=
+ 'Play Title Artist Album ';
+
+ $.each(tracks, function (i, t) {
+ var safeTitle = escapeHtml(t.title);
+ var safeArtist = escapeHtml(t.artist.name);
+ var safeAlbum = escapeHtml(t.album.title);
+
+ html += '';
+ html +=
+ 'Play ";
+ html += "" + safeTitle + " ";
+ html += "" + safeArtist + " ";
+ html += "" + safeAlbum + " ";
+ html += " ";
+ });
+ html += "
";
+
+ resultsDiv.html(html);
+ },
+ function (err) {
+ resultsDiv.html("Error: " + err);
+ }
+ );
+ }
+
+ function renderTracks(tracks, title) {
+ var html = "" + title + " ";
+ html += '';
+ html +=
+ 'Play Title Artist Album ';
+
+ $.each(tracks, function (i, t) {
+ var safeTitle = escapeHtml(t.title);
+ var safeArtist = escapeHtml(t.artist.name);
+ var safeAlbum = escapeHtml(t.album.title);
+
+ html += '';
+ html +=
+ 'Play ";
+ html += "" + safeTitle + " ";
+ html += "" + safeArtist + " ";
+ html += "" + safeAlbum + " ";
+ html += " ";
+ });
+ html += "
";
+
+ setContent(html);
+ }
+
+ function setContent(html) {
+ $("#main-content").html(html);
+ }
+
+ function apiRequest(endpoint, success, error) {
+ if (apiInstances.length === 0) {
+ error("No API instances available.");
+ return;
+ }
+
+ var currentBaseUrl = apiInstances[currentInstanceIndex];
+ var finalUrl = currentBaseUrl;
+
+ // Check for HTTP fallback
+ if (isHttpFallback) {
+ // If original was https, downgrade it
+ if (finalUrl.indexOf("https://") === 0) {
+ finalUrl = "http://" + finalUrl.substring(8);
+ }
+ }
+
+ try {
+ $.ajax({
+ url: finalUrl + endpoint,
+ method: "GET",
+ dataType: "json",
+ success: function (data) {
+ // Logic: If successful with HTTP fallback, maybe we should stick to it?
+ // For now, we just proceed.
+ success(data);
+ },
+ error: function (xhr, status, errorThrown) {
+ handleApiError(endpoint, success, error, status + " (" + errorThrown + ")");
+ }
+ });
+ } catch (e) {
+ handleApiError(endpoint, success, error, "Exception: " + e.message);
+ }
+ }
+
+ function handleApiError(endpoint, success, error, errorMsg) {
+ // 1. Try HTTP fallback for current instance if allowed
+ if (!isHttpFallback && window.location.protocol !== "https:") {
+ // Only if current instance is HTTPS
+ if (apiInstances[currentInstanceIndex].indexOf("https://") === 0) {
+ isHttpFallback = true;
+ apiRequest(endpoint, success, error);
+ return;
+ }
+ }
+
+ // 2. Move to next instance
+ isHttpFallback = false; // Reset for next instance
+ currentInstanceIndex++;
+
+ if (currentInstanceIndex < apiInstances.length) {
+ // Retry with next instance
+ apiRequest(endpoint, success, error);
+ } else {
+ // All instances failed
+ // We could try to reset index and wait, but for now we fail.
+ // Or maybe we should loop back to 0? But infinite loops are bad.
+ // Let's just fail after one full rotation.
+ currentInstanceIndex = 0; // Reset for next user interaction attempt
+ error("All API instances failed. Last error: " + errorMsg);
+ }
+ }
+
+ function playWithEmbed(url) {
+ var container = $("#audio-container");
+ if (container.length === 0) {
+ if (audioPlayer && audioPlayer.parentNode) {
+ $(audioPlayer.parentNode).attr("id", "audio-container");
+ container = $("#audio-container");
+ }
+ }
+
+ if (container.length) {
+ var embedDiv = $("#embed-container");
+ if (embedDiv.length === 0) {
+ embedDiv = $('
');
+ container.append(embedDiv);
+ }
+ // Use html() to set innerHTML properly
+ var embedHtml = ' ';
+ embedDiv.html(embedHtml);
+ }
+ }
+
+ // Helpers
+ function escapeHtml(text) {
+ if (!text) return "";
+ return text
+ .replace(/&/g, "&")
+ .replace(//g, ">")
+ .replace(/"/g, """)
+ .replace(/'/g, "'");
+ }
+
+ function base64Decode(str) {
+ if (window.atob) {
+ return window.atob(str);
+ }
+ var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
+ var output = "";
+ str = String(str).replace(/=+$/, '');
+ if (str.length % 4 == 1) {
+ throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");
+ }
+ for (
+ var bc = 0, bs = 0, buffer, i = 0;
+ buffer = str.charAt(i++);
+ ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer,
+ bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0
+ ) {
+ buffer = chars.indexOf(buffer);
+ }
+ return output;
+ }
+});
diff --git a/legacy/index.html b/legacy/index.html
index 788f402..89a453a 100644
--- a/legacy/index.html
+++ b/legacy/index.html
@@ -1,87 +1,143 @@
-
+
-
+
Monochrome Legacy
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
- Monochrome Music
- music
+ Monochrome Music
+ music
-
-
-
-
-
- Welcome to Monochrome Music Legacy Edition check out the latest hits new songs added daily under construction sign guestbook
-
-
+
-
-
+
+
+
+ Welcome to Monochrome Music Legacy Edition check out the latest
+ hits new songs added daily under construction sign
+ guestbook
+
+
+
+
+
-
- Menu
-
-
-
-
-
-
-
-
- Free and open software
- made by binimum
- all browsers that support aac audio (may work in unsupported browsers with adobe flash) or flac audio should work
-
+
+ Menu
+
+
+
+
+
+
+
+
+ Free and open software
+ made by binimum
+ all browsers that support
+ aac audio (may work in
+ unsupported browsers with adobe flash) or
+ flac audio should
+ work
+
-
-
-
-
- Status: Ready to play.
-
-
-
- Your browser does not support the audio element.
-
-
-
-
-
- Search Music:
-
-
-
-
-
Loading...
-
+
+
+
+
+ Status: Ready to play.
+
+
+
+ Your browser does not support the audio element.
+
-
-
-
-
+
+
+ Search Music:
+
+
+
+
+
Loading...
+
+
+
+
+
+
diff --git a/legacy/legacy.js b/legacy/legacy.js
index 2fd2da5..8f1b5fc 100644
--- a/legacy/legacy.js
+++ b/legacy/legacy.js
@@ -1,5 +1,56 @@
// jQuery 1.12.4 Legacy Support
$(document).ready(function () {
+ // CORS Support for IE8/9 (XDomainRequest)
+ // Required because IE8/9 do not support CORS via standard XMLHttpRequest
+ if (window.XDomainRequest) {
+ $.ajaxTransport(function(s) {
+ if (s.crossDomain && s.async) {
+ if (s.timeout) {
+ s.xdrTimeout = s.timeout;
+ delete s.timeout;
+ }
+ var xdr;
+ return {
+ send: function(_, complete) {
+ function callback(status, statusText, responses, responseHeaders) {
+ xdr.onload = xdr.onerror = xdr.ontimeout = $.noop;
+ xdr = undefined;
+ complete(status, statusText, responses, responseHeaders);
+ }
+ xdr = new XDomainRequest();
+ try {
+ xdr.open(s.type, s.url);
+ xdr.onload = function() {
+ callback(200, "OK", { text: xdr.responseText }, "Content-Type: " + xdr.contentType);
+ };
+ xdr.onerror = function() {
+ callback(404, "Not Found");
+ };
+ xdr.ontimeout = function() {
+ callback(0, "timeout");
+ };
+ xdr.timeout = s.xdrTimeout || Number.MAX_VALUE;
+ xdr.send((s.hasContent && s.data) || null);
+ } catch(e) {
+ // Protocol Mismatch generally throws here in IE
+ callback(500, "Protocol/Access Error", { text: e.message });
+ }
+ },
+ abort: function() {
+ if (xdr) {
+ xdr.onerror = $.noop;
+ xdr.abort();
+ }
+ }
+ };
+ }
+ });
+ }
+ // Enable CORS logic in jQuery generally (if supported by this jQuery version)
+ if ($.support) {
+ $.support.cors = true;
+ }
+
var apiInstances = [];
var currentInstanceIndex = 0;
var isHttpFallback = false;
From 682421a1ae8df5d113c7b427b6a6f45c39a4aa10 Mon Sep 17 00:00:00 2001
From: uimaxbai <61615730+uimaxbai@users.noreply.github.com>
Date: Wed, 31 Dec 2025 13:38:11 +0000
Subject: [PATCH 09/14] a
---
legacy/html5.js | 64 +------------------------------------------------
1 file changed, 1 insertion(+), 63 deletions(-)
diff --git a/legacy/html5.js b/legacy/html5.js
index beb665c..2508ff4 100644
--- a/legacy/html5.js
+++ b/legacy/html5.js
@@ -295,72 +295,10 @@ $(document).ready(function () {
} else {
// No native audio support (IE < 9)
- playLegacySoundJS(streamUrl, id, quality);
+ handleError("No Native Audio Support");
}
}
- function playLegacySoundJS(url, id, quality, isRetry) {
- updateStatus("Activating Legacy Player (Flash)" + ((isRetry) ? " (HTTP)..." : "..."));
-
- // SoundJS Logic
- var soundJsUrl = url;
- // Hint extension for SoundJS
- if (soundJsUrl.indexOf(".mp3") === -1 && soundJsUrl.indexOf(".m4a") === -1) {
- soundJsUrl += "#.m4a"; // Default to AAC hint
- }
-
- // If FLAC and we are here, SoundJS will likely fail, but we'll try or alert.
- if (quality === "LOSSLESS") {
- // SoundJS can't do FLAC. And if native failed, we are out of luck for FLAC.
- // Try falling back to AAC quality for the whole track?
- if (!attemptFallback) {
- console.log("FLAC failed native, switching to HIGH quality fallback...");
- window.playTrack(id, true);
- return;
- }
- }
-
- var soundId = "track_" + id + "_" + quality + (isRetry ? "_http" : "");
- createjs.Sound.removeAllEventListeners("fileload");
-
- var playSound = function() {
- var instance = createjs.Sound.play(soundId);
- if (!instance || instance.playState === createjs.Sound.PLAY_FAILED) {
- handleLegacyError("Legacy Playback Failed");
- } else {
- updateStatus("Now Playing via Flash/Legacy...");
- }
- };
-
- createjs.Sound.addEventListener("fileload", function(event) {
- if (event.id === soundId) {
- playSound();
- }
- });
-
- try {
- createjs.Sound.registerSound(soundJsUrl, soundId);
- } catch(e) {
- handleLegacyError("Legacy Setup Failed: " + e.message);
- }
-
- function handleLegacyError(msg) {
- if (!isRetry && url.indexOf("https://") === 0) {
- console.log("Legacy HTTPS failed ("+msg+"), retrying HTTP...");
- var httpUrl = "http://" + url.substring(8);
- playLegacySoundJS(httpUrl, id, quality, true);
- return;
- }
- handleError(msg);
- }
- }
-
- function updateStatus(msg) {
- if (currentTrackInfo.length) {
- currentTrackInfo.html(msg);
- }
- }
-
function handleError(msg) {
if (!attemptFallback) {
window.playTrack(id, true);
From 8270127cb76239b010ce1b9db2e300908e0e11e4 Mon Sep 17 00:00:00 2001
From: uimaxbai <61615730+uimaxbai@users.noreply.github.com>
Date: Wed, 31 Dec 2025 13:43:44 +0000
Subject: [PATCH 10/14] use older version of jquery
---
legacy/html5.html | 2 +-
legacy/html5.js | 3 ++-
legacy/jquery-1.6.4.min.js | 4 ++++
3 files changed, 7 insertions(+), 2 deletions(-)
create mode 100644 legacy/jquery-1.6.4.min.js
diff --git a/legacy/html5.html b/legacy/html5.html
index dfbd92b..1f3bb13 100644
--- a/legacy/html5.html
+++ b/legacy/html5.html
@@ -4,7 +4,7 @@
Monochrome Legacy (HTML5)
-
+
diff --git a/legacy/html5.js b/legacy/html5.js
index 2508ff4..3634f51 100644
--- a/legacy/html5.js
+++ b/legacy/html5.js
@@ -2,7 +2,8 @@
$(document).ready(function () {
// CORS Support for IE8/9 (XDomainRequest)
// Required because IE8/9 do not support CORS via standard XMLHttpRequest
- if (window.XDomainRequest) {
+ // Note: $.ajaxTransport was added in jQuery 1.5. If using 1.2.6, this will be skipped.
+ if (window.XDomainRequest && $.ajaxTransport) {
$.ajaxTransport(function(s) {
if (s.crossDomain && s.async) {
if (s.timeout) {
diff --git a/legacy/jquery-1.6.4.min.js b/legacy/jquery-1.6.4.min.js
new file mode 100644
index 0000000..628ed9b
--- /dev/null
+++ b/legacy/jquery-1.6.4.min.js
@@ -0,0 +1,4 @@
+/*! jQuery v1.6.4 http://jquery.com/ | http://jquery.org/license */
+(function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"":"")+""),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bv(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bg(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i=0===c})}function U(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function M(a,b){return(a&&a!=="*"?a+".":"")+b.replace(y,"`").replace(z,"&")}function L(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;ic)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function J(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function D(){return!0}function C(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.4",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;B.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;ca ",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-1000px",top:"-1000px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i=f.expando,j=typeof c=="string",k=a.nodeType,l=k?f.cache:a,m=k?a[f.expando]:a[f.expando]&&f.expando;if((!m||e&&m&&l[m]&&!l[m][i])&&j&&d===b)return;m||(k?a[f.expando]=m=++f.uuid:m=f.expando),l[m]||(l[m]={},k||(l[m].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?l[m][i]=f.extend(l[m][i],c):l[m]=f.extend(l[m],c);g=l[m],e&&(g[i]||(g[i]={}),g=g[i]),d!==b&&(g[f.camelCase(c)]=d);if(c==="events"&&!g[c])return g[i]&&g[i].events;j?(h=g[c],h==null&&(h=g[f.camelCase(c)])):h=g;return h}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e=f.expando,g=a.nodeType,h=g?f.cache:a,i=g?a[f.expando]:f.expando;if(!h[i])return;if(b){d=c?h[i][e]:h[i];if(d){d[b]||(b=f.camelCase(b)),delete d[b];if(!l(d))return}}if(c){delete h[i][e];if(!l(h[i]))return}var j=h[i][e];f.support.deleteExpando||!h.setInterval?delete h[i]:h[i]=null,j?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=j):g&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=v:u&&(i=u)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.attr(a,b,""),a.removeAttribute(b),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(u&&f.nodeName(a,"button"))return u.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(u&&f.nodeName(a,"button"))return u.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==null?g:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabIndex=f.propHooks.tabIndex,v={get:function(a,c){var d;return f.prop(a,c)===!0||(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(u=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var w=/\.(.*)$/,x=/^(?:textarea|input|select)$/i,y=/\./g,z=/ /g,A=/[^\w\s.|`]/g,B=function(a){return a.replace(A,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=C;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=C);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),B).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j =0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},I=function(c){var d=c.target,e,g;if(!!x.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=H(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:I,beforedeactivate:I,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&I.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&I.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",H(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in G)f.event.add(this,c+".specialChange",G[c]);return x.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return x.test(this.nodeName)}},G=f.event.special.change.filters,G.focus=G.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c ",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML=" ",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="
";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(h=g;h0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=S.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(U(c[0])||U(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=R.call(arguments);N.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!T[a]?f.unique(e):e,(this.length>1||P.test(d))&&O.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,""," "],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""," "],_default:[0,"",""]};be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,f.support.htmlSerialize||(be._default=[1,"div","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!be[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>$2>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bh(a,d),e=bi(a),g=bi(d);for(h=0;e[h];++h)g[h]&&bh(e[h],g[h])}if(b){bg(a,d);if(c){e=bi(a),g=bi(d);for(h=0;e[h];++h)bg(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=be[l]||be._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bn.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bm,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bm.test(g)?g.replace(bm,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bv(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bw=function(a,c){var d,e,g;c=c.replace(bo,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bx=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bp.test(d)&&bq.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bv=bw||bx,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bz=/%20/g,bA=/\[\]$/,bB=/\r?\n/g,bC=/#.*$/,bD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bE=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bF=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bG=/^(?:GET|HEAD)$/,bH=/^\/\//,bI=/\?/,bJ=/
@@ -71,7 +72,7 @@
aac audio (may work in
unsupported browsers with adobe flash) or
flac audio should
- work
@@ -89,7 +90,7 @@
id="audio-player"
controls
preload="none"
- style="width: 300px; height: 30px"
+ style="width: 300px; height: 45px"
>
Your browser does not support the audio element.
diff --git a/legacy/html5.js b/legacy/html5.js
index 3634f51..e856cda 100644
--- a/legacy/html5.js
+++ b/legacy/html5.js
@@ -47,10 +47,9 @@ $(document).ready(function () {
}
});
}
- // Enable CORS logic in jQuery generally (if supported by this jQuery version)
- if ($.support) {
- $.support.cors = true;
- }
+ // REMOVED: $.support.cors = true;
+ // We MUST NOT set this for IE9. If we do, jQuery tries to use standard XHR for cross-domain,
+ // which fails ("Access is denied"). Leaving it false forces jQuery to use our custom XDR transport.
var apiInstances = [];
var currentInstanceIndex = 0;
@@ -300,6 +299,12 @@ $(document).ready(function () {
}
}
+ function updateStatus(msg) {
+ if (currentTrackInfo.length) {
+ currentTrackInfo.html(msg);
+ }
+ }
+
function handleError(msg) {
if (!attemptFallback) {
window.playTrack(id, true);
diff --git a/legacy/legacy.js b/legacy/legacy.js
index 8f1b5fc..cd5c53e 100644
--- a/legacy/legacy.js
+++ b/legacy/legacy.js
@@ -46,10 +46,9 @@ $(document).ready(function () {
}
});
}
- // Enable CORS logic in jQuery generally (if supported by this jQuery version)
- if ($.support) {
- $.support.cors = true;
- }
+ // REMOVED: $.support.cors = true;
+ // We MUST NOT set this for IE9. If we do, jQuery tries to use standard XHR for cross-domain,
+ // which fails ("Access is denied"). Leaving it false forces jQuery to use our custom XDR transport.
var apiInstances = [];
var currentInstanceIndex = 0;
From ab9d664fb3ae57594a73e2f345e40797bdd3c00b Mon Sep 17 00:00:00 2001
From: uimaxbai <61615730+uimaxbai@users.noreply.github.com>
Date: Wed, 31 Dec 2025 14:11:35 +0000
Subject: [PATCH 12/14] change to safari 5+
---
legacy/html5.html | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/legacy/html5.html b/legacy/html5.html
index 1953161..1f4a6b0 100644
--- a/legacy/html5.html
+++ b/legacy/html5.html
@@ -71,8 +71,9 @@
>all browsers that support
aac audio (may work in
unsupported browsers with adobe flash) or
- flac audio should
- work (aka IE9+, Safari 4+, Chrome 12+, Firefox 22+)flac audio should work (aka
+ IE9+, Safari 5+, Chrome 12+, Firefox 22+, tested on IE9, Chrome
+ 15)
From bdf19932418c50c72749d1e272cc3f7e3d898006 Mon Sep 17 00:00:00 2001
From: uimaxbai <61615730+uimaxbai@users.noreply.github.com>
Date: Wed, 31 Dec 2025 14:31:36 +0000
Subject: [PATCH 13/14] add compatability
---
legacy/compatibility.html | 192 ++++++++++++++++++++++++++++++++++++++
legacy/html5.html | 13 +--
legacy/index.html | 5 +-
3 files changed, 200 insertions(+), 10 deletions(-)
create mode 100644 legacy/compatibility.html
diff --git a/legacy/compatibility.html b/legacy/compatibility.html
new file mode 100644
index 0000000..d37fea2
--- /dev/null
+++ b/legacy/compatibility.html
@@ -0,0 +1,192 @@
+
+
+
+ Monochrome Legacy - Compatibility
+
+
+
+
+
+
+
+
+
+
+
+ Monochrome Music
+ music
+
+
+
+
+
+
+ compatibility information
+
+
+
+
+
+
+
+
+ Menu
+
+
+
+
+
+
+ free and open software
+ made by binimum
+
+
+
+
+
+
+
System Requirements
+
+
+
+
+ Welcome to the Monochrome Music Legacy Edition connectivity test
+ center.
+
+
+
+ Requirement: Any browser that supports
+ AAC Audio or
+ FLAC Audio .
+
+
+
+
Officially supported: (HTML5)
+
+ Internet Explorer 9+
+ Google Chrome 12+
+ Safari 5+
+
+ Firefox 22+ (must have AAC codecs installed - so not
+ WinXP/Win7 by default until Firefox 51+!)
+
+
+
+ Note: Older browsers (IE 5.5-8) may work if you have Adobe
+ Flash Player installed.
+
+
+ Note 2: On many older browsers you will need to visit the
+ site using HTTP and NOT HTTPS due to outdated SSL.
+
+
+
+
+
+
+
+ Browser
+ Min version
+ Status
+
+
+ Internet Explorer
+ 9
+
+ Tested (AAC)
+
+
+
+ Google Chrome
+ 15
+
+ Tested (AAC)
+
+
+
+ 56
+
+ Tested (FLAC)
+
+
+
+ Safari
+ 5
+
+ Tested on 5.1 (AAC)
+
+
+
+ 13
+
+ Tested on 13.1 (FLAC)
+
+
+
+ Firefox
+ 22
+
+ Partial (AAC requires codecs)
+
+
+
+ 52
+
+ Tested (FLAC)
+
+
+
+
+
+
+ << Return to Player
+
+
+
+
+
+
+
+
diff --git a/legacy/html5.html b/legacy/html5.html
index 1f4a6b0..9953415 100644
--- a/legacy/html5.html
+++ b/legacy/html5.html
@@ -46,6 +46,9 @@
@@ -66,15 +69,7 @@
height="31"
/>
Free and open software
- made by binimum
- all browsers that support
- aac audio (may work in
- unsupported browsers with adobe flash) or
- flac audio should work (aka
- IE9+, Safari 5+, Chrome 12+, Firefox 22+, tested on IE9, Chrome
- 15)
+ made by binimum
diff --git a/legacy/index.html b/legacy/index.html
index 89a453a..489ea01 100644
--- a/legacy/index.html
+++ b/legacy/index.html
@@ -66,6 +66,9 @@
@@ -110,7 +113,7 @@
id="audio-player"
controls
preload="none"
- style="width: 300px; height: 30px"
+ style="width: 300px; height: 45px"
>
Your browser does not support the audio element.
From 413f5fefc2eeca2d44a759cc5efcdba169d898b3 Mon Sep 17 00:00:00 2001
From: uimaxbai <61615730+uimaxbai@users.noreply.github.com>
Date: Wed, 31 Dec 2025 14:33:32 +0000
Subject: [PATCH 14/14] remove netscape badge (it won't work on netscape)
---
legacy/compatibility.html | 6 ------
legacy/html5.html | 6 ------
legacy/index.html | 13 -------------
3 files changed, 25 deletions(-)
diff --git a/legacy/compatibility.html b/legacy/compatibility.html
index d37fea2..fa7edf3 100644
--- a/legacy/compatibility.html
+++ b/legacy/compatibility.html
@@ -64,12 +64,6 @@
width="88"
height="31"
/>
-
free and open software
made by binimum
diff --git a/legacy/html5.html b/legacy/html5.html
index 9953415..3a2c917 100644
--- a/legacy/html5.html
+++ b/legacy/html5.html
@@ -62,12 +62,6 @@
width="88"
height="31"
/>
-
Free and open software
made by binimum
diff --git a/legacy/index.html b/legacy/index.html
index 489ea01..e988903 100644
--- a/legacy/index.html
+++ b/legacy/index.html
@@ -82,21 +82,8 @@
width="88"
height="31"
/>
-
Free and open software
made by binimum
- all browsers that support
- aac audio (may work in
- unsupported browsers with adobe flash) or
- flac audio should
- work