Skip to content

Instantly share code, notes, and snippets.

@avipars
Last active November 23, 2022 11:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avipars/36621afc7a9d6cb705bcb0295ee84d79 to your computer and use it in GitHub Desktop.
Save avipars/36621afc7a9d6cb705bcb0295ee84d79 to your computer and use it in GitHub Desktop.
show hidden items on nagwa.com
// ==UserScript==
// @name Nagwa Locked Content Shower
// @namespace http://aviparshan.com/
// @version 1.0.1.3
// @description Shows the locked content on Nagwa (math and science content)
// @author avipars
// @include *://nagwa.com/*
// @include *://*.nagwa.com/*
// @grant none
// @license MIT
// ==/UserScript==
var collection = document.querySelector('div[class*="not-available"]'); //match any class that is locked
for (let i = collection.classList.length - 1; i >= 0; i--) { //iteratre through results
const className = collection.classList[i]; //save current element in variable
if (className.startsWith('not-available')) { //verify if it is a match
collection.classList.remove(className); //remove the lock
collection.classList.add("theorem"); //add the theorem div class
}
}
@avipars
Copy link
Author

avipars commented Nov 23, 2022

@avipars
Copy link
Author

avipars commented Nov 23, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment