// ==UserScript== // @name [New] Coinpayu // @namespace https://greasyfork.org/users/1162863 // @version 2.0 // @description Open and close Framed and Frameless Ads // @author Andrewblood // @icon https://coinfinity.top/favicon.ico // @match *://*/* // @grant GM_addStyle // @grant GM_setValue // @grant GM_getValue // @grant GM_listValues // @grant GM_deleteValue // @grant window.close // @grant window.focus // @antifeature referral-link Referral-Link is in this Script integrated. // @license Copyright Andrewblood // @downloadURL none // ==/UserScript== (function() { 'use strict'; var savedURL = GM_getValue('savedURL'); if (savedURL) { if (window.location.href.includes(savedURL)) { // Lösche die gespeicherte URL GM_deleteValue('savedURL'); // Schließe das Fenster, wenn die gespeicherte URL mit der aktuellen URL übereinstimmt window.close(); } } if (window.location.href.includes("coinpayu")) { // CSS-Stil für das Overlay var overlayStyle = ` #overlay { position: fixed !important; right: 10px !important; /* Abstand vom linken Rand */ bottom: 10px !important; /* Abstand vom unteren Rand */ width: 300px !important; /* Breite des Overlays */ height: 180px !important; /* Höhe des Overlays */ background-color: rgba(0, 0, 0, 0.5) !important; /* Halbtransparentes Schwarz */ color: black !important; /* Schriftfarbe Schwarz */ padding: 10px !important; z-index: 9999 !important; /* Stellen Sie sicher, dass das Overlay oben liegt */ font-size: 16px !important; /* Schriftgröße 16px */ display: flex; flex-direction: column; /* Überschrift und Inhalt untereinander */ } #overlay h2 { font-size: 20px; /* Größe des h2-Titels */ margin-bottom: 10px; /* Abstand nach unten */ text-align: center; /* Überschrift zentriert */ } .checkbox-container { display: flex; align-items: center; /* Vertikal zentriert */ margin-left: 40px; /* Abstand vom linken Rand */ margin-bottom: 5px; /* Abstand nach unten */ } `; // Füge den CSS-Stil hinzu GM_addStyle(overlayStyle); // Erstelle das Overlay-Element mit innerHTML var overlay = document.createElement('div'); overlay.id = 'overlay'; // Überschrift overlay.innerHTML = '
Faucet Monitor: Open ' + url + ' for ' + time + 'seconds.
', 'green'); if (firstElement) { firstElement.click(); var interval = setInterval(function() { var alertElement = document.querySelector(".alert-div.alert-green"); if (alertElement) { clearInterval(interval); setTimeout(function() { window.focus(); window.location.reload(); }, 1000) } }, 1000) } } else { window.location.replace("https://www.coinpayu.com/dashboard/ads_surf"); } }, 5000); } 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); } } if(savedFramelessAdsStatus && window.location.href.includes("coinpayu.com/dashboard/ads_surf")){ 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); // Speichere die URL mit GM_setValue GM_setValue('savedURL', url); console.log('Faucet Monitor: Open ' + url + ' for ' + time + ' seconds.
', 'green'); urlElement.removeAttribute('title'); if (firstElement) { firstElement.click(); window.focus(); var interval = setInterval(function() { var alertElement = document.querySelector(".alert-div.alert-green"); if (alertElement) { clearInterval(interval); window.location.reload(); } }, 1000); } } else if (savedCloseStatus) { window.close(); } else { setTimeout(function() { window.location.replace("https://www.coinpayu.com/dashboard/ads_active"); }, 1000*60*60*3); } }, 5000); } } })();