您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Made by Skyfall. Show link to download biggest image on Flickr
当前为
// ==UserScript== // @name Flickr Original Link // @namespace https://greasyfork.org/scripts/1190-flickr-original-link // @include http://*.flickr.com/photos/* // @include https://*.flickr.com/photos/* // @version 3.1 // @grant none // @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js // @description Made by Skyfall. Show link to download biggest image on Flickr // ==/UserScript== var size = document.documentElement.innerHTML.match(/"sizes":{(.+?})}/i); if (size) { var mWidth, mHeight, mLink, mSize, length; var strCss = ".bigButton {display : inline-block; cursor : pointer; border-style : solid; border-width : 2px; border-radius : 50px; padding : 15px 15px; font-size : 10pt; font-weight : bold;} .smallButton { display: inline-block; padding: 0.6em; margin: 0.4em; background-color: pink; border-radius:1.5em;font-size:10pt}"; mSize = size[0].match(/"width":\d+,"height":\d+,/ig); mLink = size[0].match(/"url":"[^"]+"/ig); length = mLink.length; for (var k = 0; k < length; k++) { mSize[k] = mSize[k].replace(/"width":(\d+),"height":(\d+),/i, "$1 x $2"); mLink[k] = "http:" + mLink[k].replace(/"url":"([^"]+)"/i, "$1").replace(/\\\//g, "/"); } $('head').append('<style>' + strCss + '</style>'); var insertLocation = $('.sub-photo-right-row1'); insertLocation.append('<a class="bigButton" href="' + mLink[length - 1] + '">DOWNLOAD ' + mSize[length - 1] + ' px</a>'); for (var k = 0; k < 7; k++) { if (length - k - 2 > 0) insertLocation.append('<a class="smallButton" href="' + mLink[length - 2 - k] + '">' + mSize[length - 2 - k] + ' px</a>'); } }