您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Makes it possible to write notes for games
// ==UserScript== // @name Private_Notes_4_Games // @namespace DanWL // @description Makes it possible to write notes for games // @include https://www.warzone.com/MultiPlayer?GameID=* // @version 1.0.0.5 // @grant none // ==/UserScript== var GameID = location.href.split(/\?GameID=/i)[1]; function addButton(text, onclick, classes, cssObj) { cssObj = cssObj || {position: 'absolute', bottom: '7%', left:'4%', 'z-index': 3} let button = document.createElement('button'), btnStyle = button.style document.body.appendChild(button) button.innerHTML = text button.onclick = onclick button.className = classes Object.keys(cssObj).forEach(key => btnStyle[key] = cssObj[key]) return button } function duplicate(source) { var original = document.getElementById(source); var clone = original.cloneNode(true); // "deep" clone clone.id = "duplicater" + ++i; // there can only be one element with an ID clone.innerHTML = 'CLONED' clone.onclick = duplicate; // event handlers are not cloned return clone; } function createUI() { var multiplayer_dropdown = document.getElementById('#ujs_MenuBtn_btn'); var GameNotesBtn = clone('ujs_MenuBtn_btn'); multiplayer_dropdown.appendChild(GameNotesBtn); } createUI();