您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Add misskey share button
当前为
// ==UserScript== // @name Misskey.io share button for AtCoder // @namespace http://kaminarinet.com/ // @version 0.0.0 // @description Add misskey share button // @author KA37RI // @match https://atcoder.jp/users/*/history/share/* // @icon none // @grant none // @license MIT // ==/UserScript== window.onload = function() { let im = document.createElement("img"); im.setAttribute("src", "https://s3.arkjp.net/misskey/webpublic-0c66b1ca-b8c0-4eaa-9827-47674f4a1580.png"); im.setAttribute("width", "20px"); im.setAttribute("height", "20px"); let lk = document.createElement("a"); lk.appendChild(im); let a2a = document.getElementsByClassName("a2a_kit")[0]; lk.addEventListener("click", function() { let mesURL = a2a.getAttribute("data-a2a-url"); let mesContent = a2a.getAttribute("data-a2a-title"); let message = encodeURI(mesURL + "\n" + mesContent); let share = `https://misskey.io/share?text=${message}`; window.open(share); }); a2a.appendChild(lk); };