Get Google Photo Direct Link
当前为
// ==UserScript==
// @name Google Album Archive Direct Photo Link
// @namespace http://qqboxy.blogspot.com
// @version 0.3
// @description Get Google Photo Direct Link
// @author QQBoxy
// @match *.googleusercontent.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var linkSplit = window.location.href.split("=");
if(linkSplit[1] !== "s0-tmp.jpg" && linkSplit.length>1) {
var directLink = linkSplit[0] + "=s0-tmp.jpg";
window.location.href = directLink;
} else {
var PARAM = URL.match(/(w\d+\-h\d+)((?:\-[rw|p|no]+)+)/);
if(PARAM) {
URL = URL.replace(PARAM[0],"s0");
document.location = URL;
}
}
})();