Greasy Fork 还支持 简体中文。

Google Drive Auto Download (without preview)

Auto download files from Google Drive without preview.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Google Drive Auto Download (without preview)
// @namespace    https://greasyfork.org/en/users/223360
// @version      1.0.0.1
// @description  Auto download files from Google Drive without preview.
// @author       Zennar
// @match        https://drive.google.com/*
// @match        https://docs.google.com/*
// @grant        none
// @icon         https://ssl.gstatic.com/docs/doclist/images/infinite_arrow_favicon_4.ico
// @run-at       document-end
// ==/UserScript==vvvar thisUrl = document.location.href;
var thisUrl=location.href;
if(/[drive|docs].google.com\/file/.test(thisUrl))
{
    var gdf_id= /\/file\/d\/([^\/]+)/i.exec(thisUrl);
    var newhref = location.protocol+'//'+location.hostname+'/uc?id='+gdf_id[1]+'&export=download'
    location.href=newhref;
}
if(/[drive|docs].google.com\/uc\?id/.test(thisUrl))
{
    var dlbtn = document.getElementById('uc-download-link');
    if (dlbtn.href.length > 0) {
        dlbtn.click();
    }
}