Skip to content
Snippets Groups Projects
Commit 9107faca authored by xj9's avatar xj9
Browse files

issue #1 - better nsfw image loading

preload the image when it is toggled, but wait to replace it until
it has loaded.
parent 60759152
No related branches found
No related tags found
No related merge requests found
......@@ -5,3 +5,4 @@ npm-debug.log
test/unit/coverage
test/e2e/reports
selenium-debug.log
.idea/
......@@ -29,7 +29,11 @@ const Attachment = {
}
},
toggleHidden () {
this.showHidden = !this.showHidden
let img = document.createElement('img')
img.src = this.attachment.url
img.onload = () => {
this.showHidden = !this.showHidden
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment