您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
good
当前为
// ==UserScript== // @name xchina // @version 2024.3.29 // @author You // @description good // @include https://xchina.co/* // @grant GM_getValue // @grant GM_setValue // @grant GM_deleteValue // @grant GM_download // @grant GM_xmlhttpRequest // @connect * // @require https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.5.1.min.js // @require https://code.jquery.com/jquery-3.6.0.min.js // @require https://update.greasyfork.org/scripts/480132/1349340/Get_all_img_Library.js // @namespace https://greasyfork.org/users/1210231 // ==/UserScript== $(function(){ get_list(get_big_img) //changePB() }) function get_list(callback){ if(window.location.href.match(/xchina\.co\/photo\/id-\w+\.html/g)){}else{return} let key = "xchina" let atag = $('a.next[href]:first') let nums = (()=>{ if(atag.length>0&&atag.prev().length>0){ return Number(atag.prev().text()) }else{ return 1 } })() atag = $('a[current="true"]:first') if(atag.length==0){callback($('.photos').children());return} let geturl = function(i){return atag[0].href.replace(/\d+(?=\.)/,(i+1))} let getimg = function(data){return $(data).find('.photos').children().attr('ccc','yes')} let putimg = function(img,i){ $('.photos').append(img) $('.mass_top').css('font-size','10vw') $('.photos').children('*:not([ccc])').remove() $('*:not(.download_bu,.mass_top)').filter(function(){return $(this).css('position')=="fixed"}).remove() callback(img) } window.GAIL.get_img_obo_ajax_href(key,nums,geturl,getimg,putimg) } function get_big_img(img){ let iimg = img.find('img') iimg.each(function(){ $(this).parent().before($(this)) $(this).next().remove() this.src = this.src.replace(/_[^\.]+/g,"").replace(/\w+$/g,"jpg") $(this).parents('a:first[href]').removeAttr('href') $(this).click(function(){ let name = document.title + ".jpg" let src = this.src GM_download({ url:src, name:name, }) }) }) $(".push-bottom").remove() return }