Hide Solution Button - learnpython.org

Hide Solution Button at learnpython.org interactive courses

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 or Violentmonkey 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.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name        Hide Solution Button - learnpython.org
// @namespace   Violentmonkey Scripts
// @match       https://www.learnpython.org/*
// @grant       none
// @version     1.0
// @author      Sergey Zhdanov
// @description Hide Solution Button at learnpython.org interactive courses
// @license     MIT
// ==/UserScript==
function hide_solution_button()
{
    for (btn of document.querySelectorAll("button:not(.ng-hide)[ng-show=solutionButtonShown]")) 
    { 
        // console.log(btn); 
        btn.classList.add("ng-hide"); 
    }
}

window.addEventListener('load', hide_solution_button, false);