Autoclick Download Button journaldupirate.net

try to take over the world!

< 腳本Autoclick Download Button journaldupirate.net的回應

評論:普通 - 腳本能使用,但有一些問題

§
發表於:2020-12-26

Hi,
I've just added some features to your script :
- Auto copy the url found into the clipboard
- Auto close window, like this, it's easier to use it with program like FreeRapid or others download programs.

// ==UserScript==
// @name Autoclick Download Button journaldupirate.net
// @namespace https://gf.qytechs.cn/fr/users/11667-hoax017
// @version 0.1
// @description try to take over the world!
// @author Hoax017
// @match https://www.journaldupirate.net/go_to/*
// @grant window.close
// @grant window.focus
// ==/UserScript==
//
//TODO in firefox settings for the automatic close
// Go to address bar and type about:config
// Go to parameter dom.allow_scripts_to_close_windows
// Set its value as true


(function() {
'use strict';
if(document.querySelector('input[value="Continuer pour voir le lien"]')) {
document.querySelector('input[value="Continuer pour voir le lien"]').click()
}

if (document.querySelector('div.alert a')) {
var link = document.querySelector('div.alert a')
link.href = link.href.replace(/(\?|&)af=\d+/,'').replace(/(\?|&)aff_id=\d+/,'')
//alert(link.href)
textToClipboard(link.href)
window.close();
}
})();

function textToClipboard (text) {
var dummy = document.createElement("textarea");
document.body.appendChild(dummy);
dummy.value = text;
dummy.select();
document.execCommand("copy");
document.body.removeChild(dummy);
}

發表回覆

登入以回復

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址