PDF Drive direct download

to skip the annoying wait before download.

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name         PDF Drive direct download
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  to skip the annoying wait before download.
// @author       Kiwi Poon
// @match        *://www.pdfdrive.com/*.html
// @match        *://pdfdrive.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Get current url:
    console.log("Current URL: " + window.location.href);
    let url = window.location.href;

    // Check the url whether in download page current.
    if(url.match(/d[0-9]{3,11}.html/g)){

        console.log("This is a download page");
        // to show the download link
        document.getElementById("alternatives").style.display = "";
        document.getElementById("alternatives").style.textalign = "left";

        // hide the timer
        document.getElementById("broken").style.display = "none";

    // if the url isn't download page
    }else if(url.match(/e[0-9]{3,11}.html/g)){
        console.log("This is not a download page");

        // click the button automatically
        document.getElementById("download-button-link").click();
    }







})();