Last active
May 18, 2018 15:17
-
-
Save ygun/56d320cc5b901a71154a28c2c8ea1281 to your computer and use it in GitHub Desktop.
Script which removes duplicate text from user reports
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==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