Skip to content

Instantly share code, notes, and snippets.

@ygun
Last active May 18, 2018 15:17
Show Gist options
  • Save ygun/56d320cc5b901a71154a28c2c8ea1281 to your computer and use it in GitHub Desktop.
Save ygun/56d320cc5b901a71154a28c2c8ea1281 to your computer and use it in GitHub Desktop.
Script which removes duplicate text from user reports
// ==UserScript==
// @name Clean comments on antitreningi.ru
// @namespace http://tampermonkey.net/
// @version 0.2
// @description try to take over the world!
// @author You
// @match http://antitreningi.ru/ru/student/lessons/lesson/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Your code here...
function doc_keyUp(e) {
var $ = window.jQuery;
switch (e.keyCode) {
case 120: //F9
var elements = document.querySelectorAll('.b-hwtest__one__answer > i');
Array.prototype.forEach.call(elements, function(el, i) {
el.parentNode.removeChild(el);
});
break;
default:
break;
}
}
document.addEventListener('keyup', doc_keyUp, false);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment