mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-27 05:14:53 -05:00
better scripts
This commit is contained in:
15
data/scripts/old/loadImage.js
Normal file
15
data/scripts/old/loadImage.js
Normal file
@@ -0,0 +1,15 @@
|
||||
function loadImage(event, destination, arg) {
|
||||
if (arg != false) {
|
||||
var input = event.target
|
||||
var reader = new FileReader()
|
||||
reader.onload = function() {
|
||||
var dataURL = reader.result
|
||||
destination.src = dataURL
|
||||
destination.cropped = false
|
||||
if (destination == imgWatermark) {
|
||||
imgWatermark.whiteToTransparent = false
|
||||
}
|
||||
}
|
||||
reader.readAsDataURL(input.files[0])
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user