Platzi - AntiCodeSpam blur!

Put a blur effect on code comments to prevent spoilers

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Platzi - AntiCodeSpam blur!
// @namespace    http://tampermonkey.net/
// @version      0.2
// @author       Facundo Soto
// @match        https://platzi.com/clases/*
// @description  Put a blur effect on code comments to prevent spoilers
// @icon         https://www.google.com/s2/favicons?domain=platzi.com
// @require      http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @require      https://greasyfork.org/scripts/31940-waitforkeyelements/code/waitForKeyElements.js?version=209282
// @grant        GM_addStyle
// @run-at       document-idle
// ==/UserScript==

waitForKeyElements ("#material-view pre code", function(e) {

    var elemento = $(e[0]);

    elemento.css({"filter": "blur(5px)grayscale(1)", "transition": ".2s ease"});

    elemento.hover(
        function () {
            $(this).css("filter", "blur(0px)")
        },

        function () {
            $(this).css("filter", "blur(5px)grayscale(1)")
        }
    )

});