Mercurial > hg > webaudioevaluationtool
comparison 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 |
comparison
equal
deleted
inserted
replaced
1328:cd04892eb2f1 | 1329:b175ea21b021 |
---|---|
128 storage.initialise(); | 128 storage.initialise(); |
129 | 129 |
130 // Detect the interface to use and load the relevant javascripts. | 130 // Detect the interface to use and load the relevant javascripts. |
131 var interfaceJS = document.createElement('script'); | 131 var interfaceJS = document.createElement('script'); |
132 interfaceJS.setAttribute("type","text/javascript"); | 132 interfaceJS.setAttribute("type","text/javascript"); |
133 if (specification.interface == 'APE') { | 133 switch(specification.interface) |
134 { | |
135 case "APE": | |
134 interfaceJS.setAttribute("src","ape.js"); | 136 interfaceJS.setAttribute("src","ape.js"); |
135 | 137 |
136 // APE comes with a css file | 138 // APE comes with a css file |
137 var css = document.createElement('link'); | 139 var css = document.createElement('link'); |
138 css.rel = 'stylesheet'; | 140 css.rel = 'stylesheet'; |
139 css.type = 'text/css'; | 141 css.type = 'text/css'; |
140 css.href = 'ape.css'; | 142 css.href = 'ape.css'; |
141 | 143 |
142 document.getElementsByTagName("head")[0].appendChild(css); | 144 document.getElementsByTagName("head")[0].appendChild(css); |
143 } else if (specification.interface == "MUSHRA") | 145 break; |
144 { | 146 |
147 case "MUSHRA": | |
145 interfaceJS.setAttribute("src","mushra.js"); | 148 interfaceJS.setAttribute("src","mushra.js"); |
146 | 149 |
147 // MUSHRA comes with a css file | 150 // MUSHRA comes with a css file |
148 var css = document.createElement('link'); | 151 var css = document.createElement('link'); |
149 css.rel = 'stylesheet'; | 152 css.rel = 'stylesheet'; |
150 css.type = 'text/css'; | 153 css.type = 'text/css'; |
151 css.href = 'mushra.css'; | 154 css.href = 'mushra.css'; |
155 | |
156 document.getElementsByTagName("head")[0].appendChild(css); | |
157 break; | |
158 | |
159 case "AB": | |
160 interfaceJS.setAttribute("src","AB.js"); | |
161 | |
162 // AB comes with a css file | |
163 var css = document.createElement('link'); | |
164 css.rel = 'stylesheet'; | |
165 css.type = 'text/css'; | |
166 css.href = 'AB.css'; | |
152 | 167 |
153 document.getElementsByTagName("head")[0].appendChild(css); | 168 document.getElementsByTagName("head")[0].appendChild(css); |
154 } | 169 } |
155 document.getElementsByTagName("head")[0].appendChild(interfaceJS); | 170 document.getElementsByTagName("head")[0].appendChild(interfaceJS); |
156 | 171 |