Skip to content

Instantly share code, notes, and snippets.

@mmore500
Created August 25, 2024 21:13
Show Gist options
  • Save mmore500/912021a9f9ffc45d651067ce2eb6f722 to your computer and use it in GitHub Desktop.
Save mmore500/912021a9f9ffc45d651067ce2eb6f722 to your computer and use it in GitHub Desktop.
Unblock Grammarly for Replit
(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