Created
March 3, 2024 17:58
-
-
Save XenocodeRCE/fa91407baee12955a6b7182028865832 to your computer and use it in GitHub Desktop.
Récupérer le contenu KnowUnity
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
| // content.js | |
| function modifyHTML() { | |
| // Remove blur effect from elements with class "hkxSCF" | |
| const blurElements = document.querySelectorAll('.hkxSCF'); | |
| blurElements.forEach((element) => { | |
| element.style.filter = 'none'; | |
| }); | |
| // Remove elements with class "action" and style "display: block" | |
| const actionElements = document.querySelectorAll('.action'); | |
| actionElements.forEach((actionElement) => { | |
| actionElement.remove(); | |
| }); | |
| // Remove element with XPath /html/body/div/main/div/div/div[1]/div[1]/div | |
| const elementToRemove = document.evaluate('/html/body/div/main/div/div/div[1]/div[1]/div', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; | |
| if (elementToRemove) { | |
| elementToRemove.remove(); | |
| } | |
| console.log('done.'); | |
| } | |
| // Ensure the DOM content is fully loaded before running the modification | |
| if (document.readyState === 'loading') { | |
| document.addEventListener('DOMContentLoaded', modifyHTML); | |
| } else { | |
| modifyHTML(); | |
| } |
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
| { | |
| "manifest_version": 2, | |
| "name": "KnowUnity Free", | |
| "version": "1.0", | |
| "permissions": ["activeTab"], | |
| "browser_action": { | |
| "default_icon": "icon.png" | |
| }, | |
| "content_scripts": [ | |
| { | |
| "matches": ["https://knowunity.fr/*"], | |
| "js": ["content.js"] | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment