RootEval / Onblur-Fucker

// ==UserScript==
// @name         Onblur-Fucker
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://online-edu.mirea.ru/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
  'use strict';

  let oldavl = window.addEventListener;
  window.addEventListener = (type, listener, options=null)=>{
      let arg = type.toLowerCase();
      if (arg == 'blur' || arg == 'visibilitychange'|| arg == 'mouseout'|| arg == 'mouseleave'){
          console.warn('Prevented '+type+' on Window', listener, options)
      }else{
          console.info(type)
          oldavl.apply(null,[type, listener, options])
      }
  }

  let doldavl = document.addEventListener;
  document.addEventListener = (type, listener, options=null)=>{
      let arg = type.toLowerCase();
      if (arg == 'blur' || arg == 'visibilitychange'|| arg == 'mouseout'|| arg == 'mouseleave'){
          console.warn('Prevented '+type+' on Document', listener, options)
      }else{
          console.info(type)
          doldavl.apply(null,[type, listener, options])
      }
  }

  let bdoldavl = document.body.addEventListener;
  document.body.addEventListener = (type, listener, options=null)=>{
      let arg = type.toLowerCase();
      if (arg == 'blur' || arg == 'visibilitychange'|| arg == 'mouseout'|| arg == 'mouseleave'){
          console.warn('Prevented '+type+' on <body>', listener, options)
      }else{
          console.info(type)
          bdoldavl.apply(null,[type, listener, options])
      }
  }

})();