Flickr Original Link

Made by Skyfall. Show link to download biggest image on Flickr

As of 2014-06-28. See the latest version.

// ==UserScript==
// @name        Flickr Original Link
// @namespace   https://greasyfork.org/users/1474-freakingprime
// @include     http://*.flickr.com/photos/*
// @include     https://*.flickr.com/photos/*
// @version		3.0
// @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":{(?:.+?)}}/);
var url = "";
var num = "";
var strCss = ".my_button {display : inline-block; cursor : pointer; border-style : solid; border-width : 2px; border-radius : 50px; padding : 15px 15px; font-size : 10pt; font-weight : bold;}";
if (size)
{
	url = size[0].match(/.*"url":"([^"]+)"/);
	num = size[0].match(/.*"width":(\d+),"height":(\d+),/);
	buttonText = "DOWNLOAD "+num[1]+" x "+num[2]+" px";
	//:685,"height":1024,"url":"\/\/farm8.staticflickr.com\/7022\/6470565807_691ea9d98f_b.jpg"
}
if (url) {
	$('head').append('<style>'+strCss+'</style>');
	var link = "http:" + url[1].replace(/\\\//g, "/");
	$('.sub-photo-right-row1').append('<a class="my_button" href="'+link+'">'+buttonText+'</a>');
}