Created
January 20, 2020 12:22
-
-
Save cahva/b72c93e306648c182d89016b4fa72a07 to your computer and use it in GitHub Desktop.
Open commentform and set the height
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
<script> | |
/* wait for element to be ready */ | |
function tryEl(e) { | |
var privEl = document.querySelector('.comment-feed-header')[0]; | |
if (!privEl) { | |
window.requestAnimationFrame(tryEl); | |
} else { | |
changeAndClick(privEl); | |
} | |
} | |
function changeAndClick(el) { | |
document.getElementById('comment-text').style.height = '40px'; | |
if (el.children[0].children[0]) { | |
el.children[0].children[0].click(); | |
} | |
} | |
tryEl(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment