您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Downloads from RapidGator account
当前为
此脚本不应直接安装,它是供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.cn-greasyfork.org/scripts/4179/13236/RapidGator%20Premium%20Downloader.js
- // ==UserScript==
- // @name RapidGator Premium Downloader
- // @version 0.3
- // @description Downloads from RapidGator account
- // @namespace https://github.com/ohec/RapidGator-Premium-Downloader
- // @downloadURL https://github.com/ohec/RapidGator-Premium-Downloader/raw/master/RapidGator_Premium_Downloader.user.js
- // @include http://rapidgator.net/file/*
- // @include http://www.rapidgator.net/file/*
- // ==/UserScript==
- (function () {
- var gm_plugin = function () {
- var options = {
- debug: false,
- openLink: true, // Open by clicking the link
- openUrl: false // Open by setting the window href
- };
- return {
- /**
- * Do the click
- */
- init: function () {
- if (document.title == 'File not found') {
- this.log('File not found - Closing');
- unsafeWindow.close();
- } else {
- var downloadLinks;
- downloadLinks = document.evaluate('//div[@class="btm"]/p/a', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
- for (var i = 0; i < downloadLinks.snapshotLength; i++) {
- var link = downloadLinks.snapshotItem(i);
- var url = link.href;
- if(options.openUrl == 1) {
- unsafeWindow.location.href = url;
- } else if(options.openLink == 1) {
- link.click();
- } else {
- this.log('Opening ' + url);
- }
- //unsafeWindow.location.href = link.href;
- //link.click();
- }
- }
- },
- /**
- * Log message
- *
- * @param message
- */
- log: function (message) {
- if (options.debug > 0) {
- console.log(message);
- }
- }
- };
- }
- var gm = new gm_plugin();
- gm.init();
- })();