Greasy Fork

来自缓存

Greasy Fork is available in English.

flickr - open an amount of next pages at once

flickr - open a specific amount of next pages at once - big button to close the page with a click

当前为 2021-03-04 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         flickr - open an amount of next pages at once
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  flickr - open a specific amount of next pages at once - big button to close the page with a click
// @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";
button.style.position = "relative";
button.style.left = "10%";

var buttonClose = document.createElement("button");
buttonClose.innerHTML = "Close this page";
buttonClose.style.backgroundColor = "#ffffff";
buttonClose.style.color = "#008ddf";
buttonClose.style.border = "2px solid";
buttonClose.style.width = "45%"; //change this value for the width of the "Close this page" button
buttonClose.style.height = "200px"; //change this value for the height of the "Close this page" button
buttonClose.style.position = "relative";
buttonClose.style.left = "40%";

document.body.appendChild(divmio);
document.body.insertBefore(button, divmio);
document.body.insertBefore(buttonClose, 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";
        }
});


buttonClose.addEventListener("click", function() {
    window.close();
});

}