AtCoder Custom Default Submissions

AtCoderのすべての提出の絞り込み、並び替え設定のデフォルトを設定します。本スクリプトのデフォルトは言語C++, 結果AC, コード長の昇順に並び替えです。

当前为 2019-12-14 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name AtCoder Custom Default Submissions
  3. // @namespace https://github.com/ktny
  4. // @version 1.2
  5. // @description AtCoderのすべての提出の絞り込み、並び替え設定のデフォルトを設定します。本スクリプトのデフォルトは言語C++, 結果AC, コード長の昇順に並び替えです。
  6. // @author ktnyori
  7. // @license MIT
  8. // @include https://atcoder.jp/contests/*
  9. // ==/UserScript==
  10. (function () {
  11. 'use strict';
  12. /**********************************************
  13. * langsの中から自分が使用する言語に変更してください
  14. ***********************************************/
  15. const lang = 'C++';
  16. const langs = {
  17. 'C++': 3003,
  18. 'C#': 3006,
  19. 'C': 3002,
  20. 'Python3': 3023,
  21. 'PyPy3': 3510,
  22. 'Ruby': 3024,
  23. 'Java': 3016,
  24. 'JavaScript': 3017,
  25. 'TypeScript': 3521,
  26. 'PHP': 3524,
  27. 'Haskell': 3014,
  28. 'Go': 3013,
  29. 'Scala': 3025,
  30. 'Perl': 3020,
  31. 'Swift': 3503,
  32. 'Rust': 3504,
  33. 'Kotlin': 3523
  34. };
  35. const params = {
  36. 'f.Language': langs[lang],
  37. // AC, WA, TLE, MLE, RE, CE, QLE, OLE, IE, WJ, WR, Judging
  38. 'f.Status': 'AC',
  39. // source_length, time_consumption, memory_consumption, score
  40. 'orderBy': 'source_length',
  41. };
  42. const esc = encodeURIComponent;
  43. const querystring = Object.keys(params).map(k => esc(k) + '=' + esc(params[k])).join('&');
  44. const links = document.querySelectorAll('#contest-nav-tabs a');
  45. for (let i = 0; i < links.length; i++) {
  46. const href = links[i].getAttribute('href');
  47. if (href && href.endsWith('submissions')) {
  48. links[i].setAttribute('href', `${href}?${querystring}`);
  49. }
  50. }
  51. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址