Greasy Fork 还支持 简体中文。

ProfileID on profile

add the profile ID to the profile page, as well as wrapping it in a copyable link

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         ProfileID on profile
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  add the profile ID to the profile page, as well as wrapping it in a copyable link
// @author       JK_3
// @match        https://www.warzone.com/Profile?p=*
// @match        https://www.warzone.com/profile?p=*
// @match        https://www.warzone.com/Profile?u=*
// @match        https://www.warzone.com/profile?u=*
// @grant        GM_setClipboard
// ==/UserScript==

// changelog

// 0.1:
// added profile ID to page

// 0.2:
// added a few lines to Common Games link since the proper ID was parsed anyways

// 0.2.1
// fixed bug with missing Common Games link element on own profile

// 0.3
// removed patch for Common Games link bug, since Fizzer fixed it on WZ's side

(function() {
    'use strict';

    let profileID = document.body.querySelector("a[href*='Report?p=']").href.slice(33)
    let url = "https://www.warzone.com/Profile?p=" + profileID;

    let centerCol = document.body.querySelector("[class*='order-md-2']")
    let big = centerCol.children[0].children[1]

    let link = document.createElement("a");
    link.href = url;
    link.text = "ID: " + profileID;
    link.id = "ProfileURL";
    link.onclick = () => { GM_setClipboard(url); return false; };

    big.appendChild(document.createElement("br"));
    big.appendChild(link);

})();