Greasy Fork is available in English.
匿名版图片修复(正常时请关闭)
当前为
// ==UserScript==
// @name 匿名版图片修复
// @namespace http://zhihaofans.com
// @version 0.0.3
// @description 匿名版图片修复(正常时请关闭)
// @author zhihaofans
// @match https://h.nimingban.com/t/*
// @grant none
// @note V0.0.1:匿名版图片修复(正常时请关闭)
// @icon https://h.nimingban.com/favicon.ico
// ==/UserScript==
function nmb_t_fix() {
var nowpage = $(".uk-pagination.uk-pagination-left.h-pagination li.uk-active span").text();
var nowid = $(".h-threads-item.uk-clearfix").attr('data-threads-id');
$.getJSON("/Api/thread?id=" + nowid + "&page=" + nowpage,
function(data) {
var nmg_img = '<div class="h-threads-img-box"><div class="h-threads-img-tool uk-animation-slide-top"><span class="h-threads-img-tool-btn h-threads-img-tool-small uk-button-link"><i class="uk-icon-minus"></i>收起</span><a class="h-threads-img-tool-btn uk-button-link" target="_blank" href="http://cdn.ovear.info:8998/image/' + data.img + data.ext + '"><i class="uk-icon-search-plus"></i>查看大图</a><span class="h-threads-img-tool-btn h-threads-img-tool-left uk-button-link"><i class="uk-icon-reply"></i>向左旋转</span><span class="h-threads-img-tool-btn h-threads-img-tool-right uk-button-link"><i class="uk-icon-share"></i>向右旋转</span></div><a class="h-threads-img-a" target="_blank" rel="_blank" href="http://cdn.ovear.info:8998/image/' + data.img + data.ext + '"><img hspace="20" border="0" align="left" class="h-threads-img" src="http://cdn.ovear.info:8998/thumb/' + data.img + data.ext + '" data-src="http://cdn.ovear.info:8998/thumb/' + data.img + data.ext + '"></a></div>';
$(".h-threads-item-main").html(nmg_img + $(".h-threads-item-main").html());
var a = 0;
$.each(data.replys,
function(i, item) {
if (item.img != "") {
var nmg_img = '<div class="h-threads-img-box"><div class="h-threads-img-tool uk-animation-slide-top"><span class="h-threads-img-tool-btn h-threads-img-tool-small uk-button-link"><i class="uk-icon-minus"></i>收起</span><a class="h-threads-img-tool-btn uk-button-link" target="_blank" href="http://cdn.ovear.info:8998/image/' + item.img + item.ext + '"><i class="uk-icon-search-plus"></i>查看大图</a><span class="h-threads-img-tool-btn h-threads-img-tool-left uk-button-link"><i class="uk-icon-reply"></i>向左旋转</span><span class="h-threads-img-tool-btn h-threads-img-tool-right uk-button-link"><i class="uk-icon-share"></i>向右旋转</span></div><a class="h-threads-img-a" target="_blank" rel="_blank" href="http://cdn.ovear.info:8998/image/' + item.img + item.ext + '"><img hspace="20" border="0" align="left" class="h-threads-img" src="http://cdn.ovear.info:8998/thumb/' + item.img + item.ext + '" data-src="http://cdn.ovear.info:8998/thumb/' + item.img + item.ext + '"></a></div>';
$(".h-threads-item-replys .h-threads-item-reply:eq(" + a + ") .h-threads-item-reply-main").html(nmg_img + $(".h-threads-item-replys .h-threads-item-reply:eq(" + a + ") .h-threads-item-reply-main").html());
a++;
}
});
});
}
$(document).ready(function() {
nmb_t_fix();
});