您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
問題文の隣にツイートするボタンを表示します。
当前为
// ==UserScript== // @name AtCoder Solve Declaration // @version 0.1 // @license MIT // @description 問題文の隣にツイートするボタンを表示します。 // @author Kyo_s_s // @match https://atcoder.jp/contests/*/tasks/* // @exclude https://atcoder.jp/contests/*/tasks/*/editorial // @namespace https://greasyfork.org/users/1129958 // ==/UserScript== (function() { 'use strict'; function createButton() { const button = document.createElement("button"); button.innerHTML = "ときます宣言"; button.classList.add("btn", "btn-default", "btn-sm"); button.addEventListener("click", function() { const text = "ときます " + window.location.href + "\n#競プロ精進"; const tweetUrl = "https://twitter.com/intent/tweet?text=" + encodeURIComponent(text); window.open(tweetUrl); }); return button; } function insertButton() { const title = document.querySelector(".h2"); if (title) { title.appendChild(createButton()); } } window.addEventListener("load", insertButton); })();