diff options
| author | czaks <marcin@6irc.net> | 2014-06-11 02:06:25 +0200 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2014-06-11 02:06:25 +0200 |
| commit | 52e463a30afc8860ededb31d4509d40a798e2990 (patch) | |
| tree | 5d0001d571fb365310e0007756f47479ab8a1377 /js/inline-expanding.js | |
| parent | 503903ac0f1ccbc104366834462377c98f64f6bb (diff) | |
| parent | 4f070d16e562d1b90f5b7fd171b7fd243dde36bd (diff) | |
Merge branch 'master' of github.com:vichan-devel/Tinyboard
Conflicts:
inc/mod/pages.php
Diffstat (limited to 'js/inline-expanding.js')
| -rw-r--r-- | js/inline-expanding.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/js/inline-expanding.js b/js/inline-expanding.js index 04d9298f..5bbfa0a0 100644 --- a/js/inline-expanding.js +++ b/js/inline-expanding.js @@ -27,9 +27,17 @@ onready(function(){ if (!this.dataset.src) { this.parentNode.removeAttribute('style'); this.dataset.expanded = 'true'; + + if (this.childNodes[0].tagName === 'CANVAS') { + this.removeChild(this.childNodes[0]); + this.childNodes[0].style.display = 'block'; + } + this.dataset.src= this.childNodes[0].src; this.dataset.width = this.childNodes[0].style.width; this.dataset.height = this.childNodes[0].style.height; + + this.childNodes[0].src = this.href; this.childNodes[0].style.width = 'auto'; this.childNodes[0].style.height = 'auto'; @@ -48,6 +56,10 @@ onready(function(){ delete this.dataset.src; delete this.childNodes[0].style.opacity; delete this.childNodes[0].style.filter; + + if (localStorage.no_animated_gif === 'true' && typeof unanimate_gif === 'function') { + unanimate_gif(this.childNodes[0]); + } } return false; } |
