Skip to content

Commit

Permalink
🐛 修复一定情况下图片消失的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
nexmoe committed Jul 29, 2019
1 parent 3639089 commit febfe07
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions source/js/app.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
$("table:has(img)").addClass("nexmoe-album");
$("article img").each(function () {
var element = document.createElement("a");
$(element).attr("data-fancybox", "gallery");
$(element).attr("href", $(this).attr("src"));
$(this).wrap(element);
});

$("#nexmoe-content img").each(function () {
$(this).attr("data-original", $(this).attr("src"));
$(this).attr("src", "");
$(this).attr("referrerPolicy", "no-referrer");
});

$("article img").each(function () {
var element = document.createElement("a");
$(element).attr("data-fancybox", "gallery");
$(element).attr("href", $(this).attr("src"));
$(this).wrap(element);
});

$("#nexmoe-sidebar a").addClass("mdui-ripple");
mdui.mutation();

Expand Down

0 comments on commit febfe07

Please sign in to comment.