Google Docs Viewer

網頁中的超連結如有包含.doc、.pdf、.tiff、.ppt、.docx、.pptx、.xls、.xlsx、.svg
將自動上色且點擊後使用Google Docs Viewer開啟
javascript: (function () {
    var link = document.links;
    for (var i = 0; i < link.length; i++) {
        if (/\.(doc|pdf|tiff|ppt|docx|pptx|xls|xlsx|svg)$/i.test(link[i].href)) {
            link[i].href = 'http://docs.google.com/viewer?url=' + encodeURIComponent(link[i].href);
            link[i].target = '_blank';
            link[i].style.backgroundColor = '#00CC00';
            link[i].style.color = '#FFF';
            link[i].style.fontWeight = 'bold';
        }
    }
})()

Google Docs Viewer
範例網頁
RegExp Object可以直接引用
/\.(doc|pdf|tiff|ppt|docx|pptx|xls|xlsx|svg)$/i.test(link[i].href)
View PDFs With Google Docs Viewer Bookmarklet [Update: Greasemonkey Script]
Bookmarklet for "Google Docs Viewer"