-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDownLoaderClouds.user.js
75 lines (72 loc) · 1.95 KB
/
DownLoaderClouds.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// ==UserScript==
// @name DownLoader Clouds
// @namespace https://vash.omnimir.ru/
// @version 1.0
// @description Press DOWN to DOWNload
// @author kapsilon
// @match https://cloud.mail.ru/*
// @match https://www.dropbox.com/s/*
// @match https://drive.google.com/file/d/*
// @match https://drive.google.com/u/0/uc?export=download*
// @match https://drive.google.com/u/0/uc?id=*export=download
// @match https://drive.google.com/uc?id=*
// @match http://www.mediafire.com/*
// @match https://www.mediafire.com/*
// @match https://mega.nz/*
// @match https://yadi.sk/d/*
// @require https://raw.githubusercontent.com/OmniMir/WebMonkey/master/lib.min.js
// @grant none
// ==/UserScript==
(function () {
"use strict";
//Press Down Arrow to Action
window.addEventListener(
"keydown",
function (event) {
if (event.code == "ArrowDown") {
//Disable Default Action
event.preventDefault();
//DropBox
wmClick(".download-button");
wmClick(".mc-popover-content-item");
//GoogleDrive
wmClick("#uc-download-link");
//MailRu
wmClick(".b-toolbar__btn_download");
wmClick(".btn_main");
//MediaFire
wmClick(".popsok");
//Mega
wmClick(".download-file");
//YandexDisk
wmClick(".download-button");
//And Close Opened Tab
wmWaitAndCloseTab()
}
},
false
);
//GoogleDrive, Start on page load to take effect
window.addEventListener(
"load",
function () {
//View mode is blocked🙁 Therefore only automated opening new tab to downloading page
setTimeout(() => {
if (
//Only with "Add to Drive" Button that appear some time later
document.querySelector(
".ndfHFb-c4YZDc-Wrql6b-htvI8d-wcotoc-wHEfpf-ndfHFb-Bz112c"
)
) {
//Open Page with download link
let downURL = document.baseURI;
downURL = downURL
.replace("file/d/", "u/0/uc?id=")
.replace("/view", "&export=download");
window.open(downURL);
}
}, 1000);
},
false
);
})();