AWA 神器裝備計時器

顯示一個按鈕來檢查神器鎖的剩餘時間。

安裝腳本?
作者推薦腳本

您可能也會喜歡 Alienware Arena 贈品密鑰檢查器

安裝腳本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name				AWA Artifact Equip Timer
// @name:ja				AWA アーティファクト装備タイマー
// @name:zh-CN				AWA 神器装备计时器
// @name:zh-TW				AWA 神器裝備計時器
// @license				CC-BY-NC-SA-4.0
// @namespace				https://twitch.tv/kikka1225
// @version				0.1
// @description				Display a button to check the artifact locks' remaining time.
// @description:ja			アーティファクトロックの残り時間を確認するためのボタンを表示します。
// @description:zh-CN			显示一个按钮来检查神器锁的剩余时间。
// @description:zh-TW			顯示一個按鈕來檢查神器鎖的剩餘時間。
// @author				Megumin & Misha
// @match				*://*.alienwarearena.com/member/*/artifacts
// @icon				https://www.google.com/s2/favicons?sz=64&domain=alienwarearena.com
// @grant				none
// @run-at				document-end
// @supportURL				https://github.com/Mishasama/UserScript/issues
// @homepageURL				https://github.com/Mishasama/UserScript/raw/master/Misha's%20US/AWA%20Artifact%20Equip%20Timer/
// @contributionURL			https://ko-fi.com/mishasama
// @contributionAmount			1¥
// @compatible				chrome
// @compatible				edge
// ==/UserScript==

(function() {
    'use strict';

    // ボタンの作成とスタイリング
    var button = document.createElement('button');
    button.textContent = '⏰';
    button.style.position = 'fixed';
    button.style.top = '655px';
    button.style.left = '50%'; // 水平方向中央揃え
    button.style.transform = 'translateX(-55%)'; // ボタンの水平位置の調整
    button.style.zIndex = '9999'; // ボタンが一番上にあることを確認する

    // クリックイベントを追加して元のスクリプトを実行する
    button.onclick = function() {alert(Object.values(artifactsData.userActiveArtifacts).reduce((acc, cur) => acc + ((24 - Math.floor((new Date() - Date.parse(cur.equippedAt.date + ' UTC'))/3600000)) >= 0).toString().replace('true', '⏰ ' + ((new Date() - Date.parse(cur.equippedAt.date + ' UTC')) % (1000 * 60 * 60) / (1000 * 60) < 1).toString().replace('true','24').replace('false',((23 - Math.floor((new Date() - Date.parse(cur.equippedAt.date + ' UTC')) / (1000 * 60 * 60))).toString().length < 2).toString().replace('true','0' + (23 - Math.floor((new Date() - Date.parse(cur.equippedAt.date + ' UTC')) / (1000 * 60 * 60)))).replace('false',(23 - Math.floor((new Date() - Date.parse(cur.equippedAt.date + ' UTC')) / (1000 * 60 * 60)))))+ ':' + (((60 - Math.floor((new Date() - Date.parse(cur.equippedAt.date + ' UTC')) % (1000 * 60 * 60) / (1000 * 60))) % 60).toString().length < 2).toString().replace('true','0' + ((60 - Math.floor((new Date() - Date.parse(cur.equippedAt.date + ' UTC')) % (1000 * 60 * 60) / (1000 * 60))) == '60').toString().replace('true','0').replace('false',(60 - Math.floor((new Date() - Date.parse(cur.equippedAt.date + ' UTC')) % (1000 * 60 * 60) / (1000 * 60))) % 60)).replace('false',((60 - Math.floor((new Date() - Date.parse(cur.equippedAt.date + ' UTC')) % (1000 * 60 * 60) / (1000 * 60))) % 60)) + ' remaining\n') .replace('false', '✅ Artifact Replaceable!\n'), ""))};

    // ページにボタンを追加する
    document.body.appendChild(button);
})();