您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Add notes to AtCoder submissions
当前为
您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
- // ==UserScript==
- // @name AtCoder Submission Notes
- // @namespace https://greatest.deepsurf.us/users/your-username
- // @version 1.0
- // @description Add notes to AtCoder submissions
- // @author zerozero-0-0
- // @match https://atcoder.jp/contests/*/submissions/me
- // @grant none
- // ==/UserScript==
- (function () {
- "use strict";
- // メモを保存・取得するためのキー生成関数
- function getNoteKey(submissionId) {
- return `atcoder_note_${submissionId}`;
- }
- // 各提出にメモ欄を追加
- document.querySelectorAll("tbody tr").forEach((row) => {
- const link = row.querySelector('a[href*="/submissions/"]');
- if (!link) return;
- const submissionId = link.href.split("/").pop();
- const noteKey = getNoteKey(submissionId);
- // メモ欄の作成
- const td = document.createElement("td");
- const textarea = document.createElement("textarea");
- textarea.style.width = "100%";
- textarea.style.height = "50px";
- textarea.value = localStorage.getItem(noteKey) || "";
- // 保存ボタン
- const saveButton = document.createElement("button");
- saveButton.textContent = "💾";
- saveButton.style.marginLeft = "5px";
- saveButton.onclick = () => {
- localStorage.setItem(noteKey, textarea.value);
- };
- td.appendChild(textarea);
- td.appendChild(saveButton);
- row.appendChild(td);
- });
- })();