try to check for webassembly in a different place

This commit is contained in:
Max Bradbury 2020-11-09 11:55:11 +00:00
parent d0946d3ab5
commit d100473542
1 changed files with 4 additions and 4 deletions

View File

@ -12,10 +12,6 @@ import init, {
set_room_name,
} from './pkg/pixsy.js';
if (typeof WebAssembly !== "object") {
window.location = "./old/"
}
// stolen from https://ourcodeworld.com/articles/read/189/how-to-create-a-file-and-generate-a-download-with-javascript-in-the-browser-without-a-server
function download(filename, text) {
let element = document.createElement('a');
@ -60,6 +56,10 @@ function readFile(input, callback, type = "text") {
}
async function run() {
if (typeof WebAssembly !== "object") {
window.location = "http://tinybird.info/image-to-bitsy/old/"
}
await init();
const buttonAddImage = el("add");