Mercurial > hg > webaudioevaluationtool
diff core.js @ 1329:b175ea21b021
Added AB interface. WIP. Stash
author | Nicholas Jillings <nickjillings@users.noreply.github.com> |
---|---|
date | Mon, 11 Jan 2016 13:56:30 +0000 |
parents | 9941539aa52b |
children | c75d2ac7f45e |
line wrap: on
line diff
--- a/core.js Mon Jan 11 11:29:12 2016 +0000 +++ b/core.js Mon Jan 11 13:56:30 2016 +0000 @@ -130,7 +130,9 @@ // Detect the interface to use and load the relevant javascripts. var interfaceJS = document.createElement('script'); interfaceJS.setAttribute("type","text/javascript"); - if (specification.interface == 'APE') { + switch(specification.interface) + { + case "APE": interfaceJS.setAttribute("src","ape.js"); // APE comes with a css file @@ -140,8 +142,9 @@ css.href = 'ape.css'; document.getElementsByTagName("head")[0].appendChild(css); - } else if (specification.interface == "MUSHRA") - { + break; + + case "MUSHRA": interfaceJS.setAttribute("src","mushra.js"); // MUSHRA comes with a css file @@ -151,6 +154,18 @@ css.href = 'mushra.css'; document.getElementsByTagName("head")[0].appendChild(css); + break; + + case "AB": + interfaceJS.setAttribute("src","AB.js"); + + // AB comes with a css file + var css = document.createElement('link'); + css.rel = 'stylesheet'; + css.type = 'text/css'; + css.href = 'AB.css'; + + document.getElementsByTagName("head")[0].appendChild(css); } document.getElementsByTagName("head")[0].appendChild(interfaceJS);