2013年7月13日 星期六

自動以原始大小開啟Picasa圖片

功能說明:
在新分頁開啟Picasa圖片時,將自動將小圖替換大圖。

下載點:
http://userscripts.org/scripts/show/155677

原始碼:
// ==UserScript==
// @name          PicasaBoxy
// @description      Auto Load Original size
// @auther        http://toolboxy.blogspot.com/
// @include       *.googleusercontent.com/*
// @version       0.5
// ==/UserScript==

(function(){
    var picasaRegex = new RegExp(/^http(?:s)?:\/\/lh[0-9]?\.googleusercontent\.com\/[-_0-9a-zA-Z]{12}\/[-_0-9a-zA-Z]{11}\/[-_0-9a-zA-Z]{11}\/[-_0-9a-zA-Z]{11}\/([-_0-9a-zA-Z]{1,})\/.+$/);
    var url = window.location.href;
    if(url.match(picasaRegex)[1]!="s0") {
        document.location = url.replace(url.match(picasaRegex)[1], "s0");
    }
})()

沒有留言: