您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
try to take over the world!
- // ==UserScript==
- // @name 2animx Load all pages
- // @namespace http://tampermonkey.net/
- // @version 0.4
- // @description try to take over the world!
- // @author You
- // @match http://www.2animx.com/index-look-name-*
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- window.addEventListener('load', function() {
- var img = $('div#img_ad_img > img#ComicPic');
- var last = $('#rightyahooad');
- var src = img.prop('src');
- var completeds = [];
- $('select[name=select1] > option').each(function (i, e) {
- if (!e.selected && completeds.indexOf(e.value) < 0) {
- completeds.push(e.value);
- var s = src.replace(/\d+.jpg/, e.value + '.jpg');
- console.log('page #' + e.value + '=' + s);
- img.clone()
- .attr('id', '')
- .attr('src', s)
- .css('margin', '10px auto 0 auto')
- .css('display', 'block')
- .insertBefore(last);
- }
- });
- });
- })();