Блог пользователя tril0713

Автор tril0713, история, 9 месяцев назад, По-английски

Is there any extension which can change the submissions status such as changing Wrong answer on test X to Wonderful answer on test X? If it exists where can I find it?

  • Проголосовать: нравится
  • +5
  • Проголосовать: не нравится

»
9 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

This extension could replace all Wrong answer to Wonderful answer in codeforces.

You need to use tampermonkey to run it.

// ==UserScript==
// @name         ReplaceWords
// @namespace    none
// @version      1
// @description  Replace "wrong" with "Wonderful" in codeforces
// @match        *://*.codeforces.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function replaceText(node) {
        if (node.nodeType === Node.TEXT_NODE) {
            node.nodeValue = node.nodeValue.replace(/wrong/gi, 'Wonderful');
        } else if (node.nodeType === Node.ELEMENT_NODE) {
            for (let i = 0; i < node.childNodes.length; i++) {
                replaceText(node.childNodes[i]);
            }
        }
    }

    replaceText(document.body);
})();

»
9 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

it's still wrong answer. Don't pose