🏠 Home 

Tool 1 for Traffic Exchange - Everve

Closes the newly opened tabs when clicked from another tab

สคริปต์นี้ไม่ควรถูกติดตั้งโดยตรง มันเป็นคลังสำหรับสคริปต์อื่น ๆ เพื่อบรรจุด้วยคำสั่งเมทา // @require https://update.greasyfork.org/scripts/457406/1133635/Tool%201%20for%20Traffic%20Exchange%20-%20Everve.js

// ==UserScript==
// @name         Tool 1 for Traffic Exchange - Everve
// @namespace    Close new tabs
// @version      1.1
// @description  Closes the newly opened tabs when clicked from another tab
// @author       Saputra
// @match        *://*/*
// @run-at       document-start
// @grant        GM_xmlhttpRequest
// @grant        window.close
// ==/UserScript==
//Stopping Alert and confirm window
unsafeWindow.alert= function(){};
unsafeWindow.confirm = function(){};
(function() {
'use strict';
//Close by window Name for everve
setTimeout(function(){
if(window.self == top  && (window.name == "EvervepopUpWindow")){
window.close();
}
},40000)
//If the url is stopped in shortlinks, move to previous url after 120 seconds
if(window.self == top && window.name.includes("https://")){
setTimeout(function(){
let url = window.name;
if(!url.includes(window.location.hostname)){
window.name = "nextWindowUrl";
window.location.href = url;
}
},120000)
}
//The timeout set is 120 seconds, you can change this accordingly
if(window.self == top && window.history.length == 1){
setTimeout(function(){
window.close();
},120000);
}
})();