Put global input for debug purposes

This commit is contained in:
Jordan Eldredge 2018-05-25 19:01:29 +01:00
parent 338cddbcb7
commit 93eb86d144

View file

@ -10,7 +10,8 @@ import { getTrackCount } from "./selectors";
import {
setSkinFromUrl,
loadMediaFiles,
setWindowSize
setWindowSize,
loadFilesFromReferences
} from "./actionCreators";
import { LOAD_STYLE } from "./constants";
import { uniqueId, objectMap, objectForEach } from "./utils";
@ -77,6 +78,18 @@ class Winamp {
type: navigator.onLine ? NETWORK_CONNECTED : NETWORK_DISCONNECTED
});
if (true) {
const fileInput = document.createElement("input");
fileInput.id = "webamp-file-input";
fileInput.style.display = "none";
fileInput.type = "file";
fileInput.value = null;
fileInput.addEventListener("change", e => {
this.store.dispatch(loadFilesFromReferences(e.target.files));
});
document.body.appendChild(fileInput);
}
this.genWindows = [];
if (__extraWindows) {
this.genWindows = __extraWindows.map(genWindow => ({