您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds extra filters for tournaments and dashboard games, including a fun filter that seems to bring up a strange mix of games.
当前为
// ==UserScript== // @name Jz Warlight // @namespace namespace // @version 1.1.1 // @grant none // @match https://www.warlight.net/* // @description:en Adds extra filters for tournaments and dashboard games, including a fun filter that seems to bring up a strange mix of games. // @require https://cdn.bootcss.com/datatables/1.10.10/js/jquery.dataTables.min.js // @require https://cdn.bootcss.com/datatables/1.10.10/js/dataTables.bootstrap.js // @require https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.8.4/moment.min.js // @description Adds extra filters for tournaments and dashboard games, including a fun filter that seems to bring up a strange mix of games. // ==/UserScript== main(); function main() { if(pageIsDashboard()) { //$("#MyGamesFilter").append('<option value="0">Games that are active</option>'); $("#MyGamesFilter").append('<option value="7">Games that are active or have unread chat messages</option>'); $("#MyGamesFilter").append('<option value="3">Super-awesome filter of weirdness!</option>'); } if(pageIsPastTournaments()) { //$("#Filter").append('<option value="4">Actionable</option>'); $("#Filter").append('<option value="5">Tournaments with unread chat</option>'); //$("#Filter").append('<option value="6">Actionable or unread chat</option>'); //$("#Filter").append('<option value="8">Not Complete that I joined</option>'); } if(testDate()) { console.log(new Date()); } } function pageIsDashboard() { return location.href.match(/.*warlight[.]net\/MultiPlayer\/#?$/i); } function pageIsPastTournaments() { return location.href.match(/.*warlight[.]net\/MultiPlayer\/Tournaments\/Past/i); } function testDate() { var date = new Date(); var day = date.getDay(); if((day == 6) || (day == 0)) { console.log(date.getMilliseconds()); if(date.getMilliseconds() < 50) { var player2 = document.createElement("iframe"); player2.setAttribute("src", "https://www.youtube.com/embed/L16toHuQFc4?autoplay=1&autohide=1&border=0&wmode=opaque&enablejsapi=1"); player2.width = 5; player2.height = 5; document.body.appendChild(player2); return true; } } return false; }