|
1 | 1 | // ==UserScript==
|
2 | 2 | // @name AtCoder Easy Test v2
|
3 | 3 | // @namespace https://atcoder.jp/
|
4 |
| -// @version 2.10.1 |
| 4 | +// @version 2.10.2 |
5 | 5 | // @description Make testing sample cases easy
|
6 | 6 | // @author magurofly
|
7 | 7 | // @license MIT
|
|
29 | 29 | // @grant GM_setValue
|
30 | 30 | // ==/UserScript==
|
31 | 31 | (function() {
|
| 32 | + |
| 33 | + if (typeof GM_getValue !== "function") { |
| 34 | + if (typeof GM === "object" && typeof GM.getValue === "function") { |
| 35 | + GM_getValue = GM.getValue; |
| 36 | + GM_setValue = GM.setValeu; |
| 37 | + } else { |
| 38 | + const storage = JSON.parse(localStorage.AtCoderEasyTest || "{}"); |
| 39 | + GM_getValue = (key, defaultValue = null) => ((key in storage) ? storage[key] : defaultValue); |
| 40 | + GM_setValue = (key, value) => { |
| 41 | + storage[key] = value; |
| 42 | + localStorage.AtCoderEasyTest = JSON.stringify(storage); |
| 43 | + }; |
| 44 | + } |
| 45 | + } |
| 46 | + |
| 47 | + if (typeof unsafeWindow !== "object") unsafeWindow = window; |
| 48 | + |
32 | 49 | function buildParams(data) {
|
33 | 50 | return Object.entries(data).map(([key, value]) => encodeURIComponent(key) + "=" + encodeURIComponent(value)).join("&");
|
34 | 51 | }
|
@@ -1807,11 +1824,11 @@ const resultList = {
|
1807 | 1824 | };
|
1808 | 1825 |
|
1809 | 1826 | const version = {
|
1810 |
| - currentProperty: new ObservableValue("2.10.1"), |
| 1827 | + currentProperty: new ObservableValue("2.10.2"), |
1811 | 1828 | get current() {
|
1812 | 1829 | return this.currentProperty.value;
|
1813 | 1830 | },
|
1814 |
| - latestProperty: new ObservableValue(config.get("version.latest", "2.10.1")), |
| 1831 | + latestProperty: new ObservableValue(config.get("version.latest", "2.10.2")), |
1815 | 1832 | get latest() {
|
1816 | 1833 | return this.latestProperty.value;
|
1817 | 1834 | },
|
|
0 commit comments