您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
AtCoderの提出結果の一覧のページにソースコードを表示します。
当前为
// ==UserScript== // @name atcoder-submission-wo-ikki-ni-miiru // @namespace http://tampermonkey.net/ // @version 0.1 // @description AtCoderの提出結果の一覧のページにソースコードを表示します。 // @author pekempey // @match https://atcoder.jp/contests/* // @grant none // @require https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js // ==/UserScript== (function() { var prettify = $('<script>').attr({ 'src': "https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js" }); $('body').append(prettify); var container = $('#main-container').append($('<div>').addClass('atcoder-submissions-container')); $('tbody tr').each(function() { var username = null; var submission = null; var problemName = null; $(this).find('a').each(function() { var href = $(this).attr('href'); if (/users\//.test(href)) { username = $(this).text(); } if (/submissions\/\d{8}/.test(href)) { submission = href; } if (/tasks/.test(href)) { problemName = $(this).text(); } }); if (submission != null && username != null && problemName != null) { $.get(submission, function(data) { var html = $(data); var src = html.find('#submission-code'); container.append($('<p>').html("<b>" + username + "</b> " + problemName)); container.append(src); // src.css('max-height', 'none'); }); } }) })();