Skip to content

Commit 340686f

Browse files
committed
Update T66y tool.user.js
1 parent aeaf086 commit 340686f

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

T66y tool/T66y tool.user.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ==UserScript==
22
// @name 草榴小助手
33
// @namespace hoothin
4-
// @version 0.6.6
4+
// @version 0.6.7
55
// @description 草榴小助手修复,提供“加亮今日帖子”、“移除viidii跳转”、“图片自动缩放”、“种子链接转磁力链”、“预览整页图片”、“游客站内搜索”、“返回顶部”等功能!
66
// @author NewType & hoothin
77
// @match *://*.t66y.com/*
@@ -126,21 +126,6 @@
126126
var viewportBottom = viewportTop + $(window).height();
127127
return elementBottom > viewportTop && elementTop < viewportBottom;
128128
};
129-
var $tLike = $(".t_like");
130-
if ($tLike.length) {
131-
var $tLikeClone = $tLike.clone();
132-
if (!$tLike.isInViewport()) {
133-
$("#conttpc").prepend($tLikeClone);
134-
}
135-
136-
$(window).on("resize scroll", function() {
137-
if ($tLike.isInViewport()) {
138-
if ($tLikeClone.parent().length) $tLikeClone.detach();
139-
} else {
140-
if ($tLikeClone.parent().length == 0) $("#conttpc").prepend($tLikeClone);
141-
}
142-
});
143-
}
144129

145130

146131
// 种子链接转磁力链
@@ -165,6 +150,21 @@
165150
var replyStr = defaultReply;
166151

167152
helper.getScript('//cdn.jsdelivr.net/npm/jquery.cookie@1.4.1/jquery.cookie.min.js', e => {
153+
var $tLike = $(".t_like");
154+
if ($tLike.length) {
155+
var $tLikeClone = $tLike.clone();
156+
if (!$tLike.isInViewport()) {
157+
$("#conttpc").prepend($tLikeClone);
158+
}
159+
160+
$(window).on("resize scroll", function() {
161+
if ($tLike.isInViewport()) {
162+
if ($tLikeClone.parent().length) $tLikeClone.detach();
163+
} else {
164+
if ($tLikeClone.parent().length == 0) $("#conttpc").prepend($tLikeClone);
165+
}
166+
});
167+
}
168168
var lastReplyTime = $.cookie('lastReplyTime');
169169
var customReplyStr = $.cookie('customReplyStr');
170170
var isCheckIn = document.title.indexOf("打卡签到") !== -1;

0 commit comments

Comments
 (0)