summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorPashe <pashe@users.noreply.github.com>2015-02-24 03:17:35 -0600
committerczaks <marcin@6irc.net>2016-05-05 13:43:04 +0200
commit5f043d0a29efd6b14d3b453955af15df8630d88b (patch)
treed3840bf1c4c5456e80366ad36f50c4ee9b9f86e2 /js
parent913420e040e9dbfdbd8302ca40093036ca39a14c (diff)
Have image-hover.js use data-fullimage instead of the API
Diffstat (limited to 'js')
-rw-r--r--js/image-hover.js15
1 files changed, 2 insertions, 13 deletions
diff --git a/js/image-hover.js b/js/image-hover.js
index 801b8dff..ac175ff4 100644
--- a/js/image-hover.js
+++ b/js/image-hover.js
@@ -133,19 +133,8 @@ function imageHoverStart(e) { //Pashe, anonish, WTFPL
if ($this.parent().attr("href").match("src")) {
fullUrl = $this.parent().attr("href");
} else if (isOnCatalog()) {
- $this.css("cursor", "progress");
- fullUrl = $this.attr("src");
- $.ajax(($this.parent().attr("href").replace(/\.html$/, ".json")), {
- success: function (result) {
- $this.css("cursor", "unset");
- fullUrl = result.posts[0].tim + result.posts[0].ext;
- if (!isImage(getFileExtension(fullUrl))) {return;}
- $("#chx_hoverImage").attr("src", "/" + thisBoard + "/" + fullUrl);
- $("#chx_hoverImage").on("load", function() {$this.css("cursor", "none")});
- },
- async: true,
- cache: true
- });
+ fullUrl = $this.attr("data-fullimage");
+ if (!isImage(getFileExtension(fullUrl))) {fullUrl = $this.attr("src");}
}
if (isVideo(getFileExtension(fullUrl))) {return;}