您需要先安装一个扩展,例如 篡改猴、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.4 // @grant none // ==/UserScript== var GameID = location.href.split(/\?GameID=/i)[1]; function addButton(text, onclick, 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 Object.keys(cssObj).forEach(key => btnStyle[key] = cssObj[key]) return button } function createUI() { var multiplayer_dropdown = document.getElementsById('#ujs_CurrentStatus'); var GameNotesBtn = addButton('Convert to single player', () => console.log('hello')); multiplayer_dropdown.appendChild(GameNotesBtn); } createUI();