Shows images instead of thumbnails on fantasti.cc
当前为
// ==UserScript==
// @name fantasti.cc image loader
// @namespace https://greasyfork.org/users/5174-jesuis-parapluie
// @author jesuis-parapluie
// @description Shows images instead of thumbnails on fantasti.cc
//
// @include http://fantasti.cc/images/*
//
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
//
// @version 0.0.3
// @grant none
// ==/UserScript==
var autoLoadImages = false;
function loadImgs()
{
var xx = $("div.HoldPhotos a img.collection_image").parent();
var a = $("<div>")
for (i=0; i < xx.length; i++) {
$.get($(xx[i]).attr("href"), function( data ) {
$($(data).find("div.s").find("img")[1]).appendTo(a);
});
$("div#loop").html($("<div id='loop'><br></div>"));
$("div#loop").append(a);
$("div#loadImgs").text("Show Thumbnails").click(loadThumbs);
}
}
function loadThumbs()
{
$("div#loop").html(thumbs);
$("div#loadImgs").text("Show Images").click(loadImgs);
}
var thumbs;
$(function ()
{
thumbs = $("div#loop").html();
var l = $('<div>', {id: 'loadImgs', style: 'margin-left: 110px;text-decoration: underline;color:#f00;cursor:pointer;font-weight: bolder;', text: 'Show Images'}).click(loadImgs);
l.insertAfter($(".search_result_cams_2"));
if (autoLoadImages)
loadImgs();
});