PayDay 3 Stats+

ajoute des stats

目前為 2023-11-29 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         PayDay 3 Stats+
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  ajoute des stats
// @author       DEV314R
// @match        https://pd3.gg/challenges/*
// @icon         https://icons.duckduckgo.com/ip2/pd3.gg.ico
// @run-at       document-end
// @grant        none
// ==/UserScript==
const interval=10//minute


if (location.href.search(/challenges\/(weapons|heists|special-units|equipment|miscellaneous)/gi) > -1) {

const objectivesProgressElements = document.querySelectorAll(".objectives-progress");

for (const objectivesProgressElement of objectivesProgressElements) {
const maxElement = objectivesProgressElement.querySelector(".objectives > .objective:last-child  > div.text");
const currentElement = objectivesProgressElement.querySelector(".current-progress > div.text");
	const prochmax = objectivesProgressElement.querySelector(".objectives > .objective:not(.completed) > div.text");
const point=objectivesProgressElement.querySelector(".objectives-progress > div > div.objectives > .objective:not(.completed) > div.text")

if(maxElement && currentElement && prochmax && point) {
    const max = parseInt(maxElement.textContent);
    const current = parseInt(currentElement.textContent);
	const prochemax = parseInt(prochmax.textContent);
const pointinf = parseInt(point.title.match(/\d+/gi));

if (max > current) {
objectivesProgressElement.insertAdjacentHTML('afterend',`<a> Proche:`+(prochemax-current)+` IP:`+pointinf+`<br>Total:`+(max-current)+`</a>`);
}
  }
}



function appuyerSurBoutonToutesLesXMinutes() {
    // Vérifie si le dernier appui sur le bouton a été enregistré
    let lastButtonClickTime = localStorage.getItem('lastButtonClickTime');

    // Si c'est la première fois, ou si cela fait plus de 10 minutes depuis le dernier appui
    if (!lastButtonClickTime || (Date.now() - lastButtonClickTime > interval * 60 * 1000)) {
        // Appuie sur le bouton
       document.querySelector("#updateUserStatsBtn").click();

        // Enregistre le temps de l'appui sur le bouton actuel
        localStorage.setItem('lastButtonClickTime', Date.now());
    }

    // Configure l'intervalle pour appeler la fonction toutes les 10 minutes
    setInterval(appuyerSurBoutonToutesLesXMinutes, interval * 60 * 1000);
}
appuyerSurBoutonToutesLesXMinutes();


}
//},1000)