flickr - open an amount of next pages at once

flickr - open a specific amount of next pages at once

目前为 2021-02-28 提交的版本。查看 最新版本

// ==UserScript==
// @name         flickr - open an amount of next pages at once
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  flickr - open a specific amount of next pages at once
// @author       ClaoDD
// @include      https://www.flickr.com/*
// @grant        none
// ==/UserScript==

var indirizzoPhotos = window.location.href;
if (indirizzoPhotos.indexOf('photos') > -1) {

var divmio = document.createElement("div");
divmio.style.cssText = 'position:static;width:100%;height:120px;opacity:0;z-index:100;';
var button = document.createElement("button");
button.innerHTML = "open the next ... pages";
document.body.appendChild(divmio);
document.body.insertBefore(button, divmio);

button.addEventListener("click", function() {

var indirizzo = window.location.href;
var indirizzoDiviso = indirizzo.split('page');
var numCorrente = indirizzoDiviso[indirizzoDiviso.length -1];
var numNew = numCorrente;
var indirizzoSenzaNum = indirizzoDiviso.splice(0, (indirizzoDiviso.length -1));

if (indirizzo.indexOf('page') > -1) {
    var numPages = prompt("how many pages to open?");
    var numStart = 1;
   while (numStart <= numPages) {
window.open(indirizzoSenzaNum +'page'+(parseInt(numCorrente, 10)+numStart), "_blank");
    numStart = numStart + 1;
}
  button.innerHTML = "...opened";
        }
});
}

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址