您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Replaces all thumbnails with the linked ones
当前为
// ==UserScript== // @name fantasti.cc image thumbnail loader // @namespace https://greasyfork.org/users/5174-jesuis-parapluie // @author jesuis-parapluie // @description Replaces all thumbnails with the linked ones // // @include http://fantasti.cc/images/* // // @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js // // @version 0.1 // @grant none // ==/UserScript== function loadImgs() { $('div#loop').each(function (i) { if (!$(this).hasClass('done')) { $(this).addClass('done'); var imgs = $('<div>', { 'class': 'images' }); imgs.appendTo($(this)); $(this).find('div[id*="post_"]').each(function (i) { if (!$(this).hasClass('imgdone')) { $(this).addClass('imgdone'); $.get($(this).find('a').attr('href'), function (data) { imgs.append($(data).find('div.s').find('img') [1]); }); } }); } }); } $(function () { var l = $('<div>', { id: 'loadImgs', style: 'margin-left: 110px;text-decoration: underline;color:#f00;cursor:pointer;font-weight: bolder;', text: 'Show images' }).click(function (e) { if ($('div#loadImgs').hasClass('imagesVisible')) { $('div#loadImgs').removeClass('imagesVisible'); $('div#loadImgs').html('Show images'); $('div.images').hide(); $('div[id*="post_"]').show(); } else { $('div#loadImgs').addClass('imagesVisible'); $('div#loadImgs').html('Show thumbnails'); $('div.images').show(); $('div[id*="post_"]').hide(); loadImgs(); } }); l.insertAfter($('.search_result_cams_2')); $(document).bind('DOMNodeInserted', function (e) { if ($('div#loadImgs').hasClass('imagesVisible') && e.target.tagName === 'DIV' && e.target.getAttribute('id') && e.target.getAttribute('id') == 'loop') { $('div.images').show(); $('div[id*="post_"]').hide(); loadImgs(); } }); });