X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/b61e4fa32bc8fb7c64910520eb9008e73ac47edf..c58ede829174b66ec4d2b0c949b771a3eed27e1b:/redakcja/static/js/wiki_img/wikiapi.js?ds=sidebyside diff --git a/redakcja/static/js/wiki_img/wikiapi.js b/redakcja/static/js/wiki_img/wikiapi.js index 81cd3162..cac7e485 100644 --- a/redakcja/static/js/wiki_img/wikiapi.js +++ b/redakcja/static/js/wiki_img/wikiapi.js @@ -49,6 +49,18 @@ this.revision = $("*[data-key='revision']", meta).text(); this.readonly = !!$("*[data-key='readonly']", meta).text(); + var diff = $("*[data-key='diff']", meta).text(); + if (diff) { + diff = diff.split(','); + if (diff.length == 2 && diff[0] < diff[1]) + this.diff = diff; + else if (diff.length == 1) { + diff = parseInt(diff); + if (diff != NaN) + this.diff = [diff - 1, diff]; + } + } + this.text = null; this.has_local_changes = false; this._lock = -1;