Created
August 25, 2024 21:13
-
-
Save mmore500/912021a9f9ffc45d651067ce2eb6f722 to your computer and use it in GitHub Desktop.
Unblock Grammarly for Replit
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
(function() { | |
'use strict'; | |
const attributesToRemove = [ | |
'spellcheck', | |
'data-gramm', | |
'data-gramm_editor', | |
'data-enable-grammarly', | |
'data-enabled-grammarly', | |
'data-language' | |
]; | |
function removeSpecificAttributes() { | |
attributesToRemove.forEach(attr => { | |
const elements = document.querySelectorAll(`[${attr}]`); | |
elements.forEach(element => element.removeAttribute(attr)); | |
}); | |
} | |
// Run the function once every second | |
setInterval(removeSpecificAttributes, 1000); | |
// Optionally run once immediately on script load | |
removeSpecificAttributes(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment