在您安装前,Greasy Fork 希望您知道此脚本包含可能不受欢迎的功能,也许会帮助脚本作者获利,而不能给你带来任何收益。
作者从这份脚本获得佣金,例如透过改写链接或提供优惠券代码以包含推荐或附属代码。
脚本作者的说明:
Referral-Link is in this Script integrated.
Open and close Framed and Frameless Ads
目前为
// ==UserScript== // @name [New] Coinpayu.com // @namespace https://greasyfork.org/users/1162863 // @version 3.0.2 // @description Open and close Framed and Frameless Ads // @author Andrewblood // @match *://*.coinpayu.com/* // @exclude *://*.coinpayu.com/login // @icon https://www.google.com/s2/favicons?sz=64&domain=coinpayu.com // @grant window.close // @antifeature referral-link Referral-Link is in this Script integrated. // @license Copyright Andrewblood // ==/UserScript== /* INFOS */ (function() { 'use strict'; var oldfunction = unsafeWindow.open; var windowName = ""; function newFunction(params1, params2) { if (!params2 || params2 == "_blank") { windowName = "popUpWindow"; } else { windowName = params2; } return oldfunction(params1, windowName); }; unsafeWindow.open = newFunction; unsafeWindow.onbeforeunload = function() { unsafeWindow.open('', windowName).close(); }; if (window.location.href.includes("register")) { if (!window.location.href.includes("Andrewblood")) { window.location.replace("https://www.coinpayu.com/register?r=Andrewblood"); } } setTimeout(function() { document.querySelector("#toViewAds").click(); setTimeout(function() { document.querySelector("#viewads > div.nav-head.dashboard-actived > p").click(); }, 500); }, 1000 * 2); setTimeout(function() { var elements = document.querySelectorAll('.clearfix.ags-list-box:not(.gray-all.clearfix.ags-list-box)'); if (elements.length > 0) { var firstElement = elements[0].querySelector('.text-overflow.ags-description > span'); var timeElement = elements[0].querySelector('.ags-detail-time span'); var urlElement = elements[0].querySelector('.text-overflow.ags-description'); var url = urlElement.getAttribute('title'); var time = parseInt(timeElement.textContent); console.log('Open ' + url + ' for ' + time + ' seconds.'); urlElement.removeAttribute('title'); if (firstElement) { firstElement.click(); unsafeWindow.open('', windowName).close(); var interval = setInterval(function() { var alertElement = document.querySelector(".alert-div.alert-green"); if (alertElement) { clearInterval(interval); window.location.reload(); } }, 1000); } } else { document.querySelector("#viewads > div:nth-child(2) > p").click(); } }, 1000 * 4); setTimeout(function() { if (document.querySelector("#app > div > div.coinpayu-dashboard-content > div.main-panel > div > div > h6").innerText.includes("Framed Ads")) { var elements = document.querySelectorAll('.clearfix.ags-list-box:not(.gray-all.clearfix.ags-list-box)'); if (elements.length > 0) { var firstElement = elements[0].querySelector('.text-overflow.ags-description > span'); var timeElement = elements[0].querySelector('.ags-detail-time span'); var url = elements[0].querySelector('.text-overflow.ags-description').getAttribute('title'); var time = parseInt(timeElement.textContent); console.log('Open ' + url + ' for ' + time + 'seconds.'); if (firstElement) { firstElement.click(); var interval = setInterval(function() { var alertElement = document.querySelector(".alert-div.alert-green"); if (alertElement) { clearInterval(interval); setTimeout(function() { unsafeWindow.open('', windowName).close(); window.location.reload(); }, 1000); } }, 1000); } } else { window.close(); } } }, 1000 * 6); if (window.location.href.includes("coinpayu.com/dashboard/view_active?id=")) { var intervalId = setInterval(function() { var waittime = document.querySelector("#app > div > div > div > div > div"); if (waittime && waittime.style.width === "100%") { clearInterval(intervalId); setTimeout(function() { window.close(); }, 500); } }, 100); } })();