()
| 73 | |
| 74 | /*-------------------------------------------------------------------------------------------------------------------------------------------*/ |
| 75 | var t66y = function() { |
| 76 | if(typeof($) == "undefined")return; |
| 77 | if (helper.inurl('/thread')) { |
| 78 | // 高亮今天发表的帖子 |
| 79 | helper.addCss('.newTag{border-bottom:1px dotted red; color:red !important}.newPost{color:#ff5722; background:#fafff4;}.newPost a[target=_blank]{color:#5656ff;}'); |
| 80 | var today = new Date(); |
| 81 | today = helper.timeFormat(today, 'yyyy-MM-dd'); |
| 82 | $('tr.tr3').each(function() { |
| 83 | var isToday = $(this).children('td').eq(2).find('div.f12').text().split(" ")[0]; |
| 84 | if (isToday === today || isToday == "今天") { |
| 85 | $(this).find('td:first').children().html('NEW').addClass('newTag'); |
| 86 | $(this).addClass('newPost'); |
| 87 | } |
| 88 | }); |
| 89 | } |
| 90 | |
| 91 | /*-------------------------------------------------------------------------------------------------------------------------------------------*/ |
| 92 | |
| 93 | if (helper.inurl('/htm_data/') || helper.inurl('read.php?')) { |
| 94 | // 移除图片viidii跳转 & 图片自动缩放 |
| 95 | var imgList = new Array(0); |
| 96 | var maxWidth = parseInt($("div#main").width() - 200) + 'px'; |
| 97 | $(document).ready(function() { |
| 98 | $('img[ess-data]').each(function() { |
| 99 | $(this).off("click"); |
| 100 | |
| 101 | $(this).attr('onclick', 'window.open(this.src);').css('max-width', maxWidth); |
| 102 | if($(this).attr('src')){ |
| 103 | imgList.push($(this).attr('src')); |
| 104 | } |
| 105 | }); |
| 106 | if (imgList.length > 0) { |
| 107 | ImageView(imgList); |
| 108 | } |
| 109 | }); |
| 110 | |
| 111 | // 移除a标签viidii跳转 |
| 112 | $("a[href*=\'.viidii.\']").each(function() { |
| 113 | var href = $(this).attr('href'); |
| 114 | var newHref = href.replace('http://www.viidii.com/?', '').replace('http://www.viidii.info/?', '').replace(/______/g, '.').replace(/&z/g, ''); |
| 115 | $(this).attr('href', newHref); |
| 116 | }); |
| 117 | $("a[href*=\'.redircdn.\']").each(function() { |
| 118 | var href = $(this).attr('href'); |
| 119 | var newHref = href.replace('https://to.redircdn.com/?', '').replace(/______/g, '.').replace(/&z/g, ''); |
| 120 | $(this).attr('href', newHref); |
| 121 | }); |
| 122 | |
| 123 | $.fn.isInViewport = function() { |
| 124 | var elementTop = $(this).offset().top; |
| 125 | var elementBottom = elementTop + $(this).outerHeight(); |
| 126 | var viewportTop = $(window).scrollTop(); |
| 127 | var viewportBottom = viewportTop + $(window).height(); |
| 128 | return elementBottom > viewportTop && elementTop < viewportBottom; |
| 129 | }; |
| 130 | |
| 131 | |
| 132 | // 种子链接转磁力链 |
no test coverage detected