debugging on mobile

This commit is contained in:
Kyle
2021-05-09 18:39:02 -07:00
committed by GitHub
parent 987ad6214e
commit 341a2e8b78

View File

@@ -1,5 +1,7 @@
//URL Params //URL Params
var params = new URLSearchParams(window.location.search); var params = new URLSearchParams(window.location.search);
const debugging = params.get('debug') != '';
console.log('debugging: ' + debugging);
//To save the server from being overloaded? Maybe? //To save the server from being overloaded? Maybe?
function fixUri(input) { function fixUri(input) {
var prefix = 'https://card-conjurer.storage.googleapis.com';//'https://raw.githubusercontent.com/ImKyle4815/cardconjurer/remake'; var prefix = 'https://card-conjurer.storage.googleapis.com';//'https://raw.githubusercontent.com/ImKyle4815/cardconjurer/remake';
@@ -1291,6 +1293,9 @@ async function downloadCard() {
imageName = card.text.nickname.text + ' (' + imageName + ')' imageName = card.text.nickname.text + ' (' + imageName + ')'
} }
download.download = imageName + '.png'; download.download = imageName + '.png';
if (debugging) {
alert(download.download, '\n', imageName + '.png');
}
download.href = cardCanvas.toDataURL(); download.href = cardCanvas.toDataURL();
document.body.appendChild(download); document.body.appendChild(download);
await download.click(); await download.click();