Created
September 8, 2015 21:22
-
-
Save okovpashko/8c26d9113a0b5e1046cd to your computer and use it in GitHub Desktop.
Fill all text nodes on page with long text
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
var a, | |
w=document.createTreeWalker(document,NodeFilter.SHOW_TEXT); | |
while(a=w.nextNode()){ | |
if(a.textContent.trim().length) { | |
a.textContent='Одиннадцатиклассница пошла посмотреть на достопримечательность, она шла долго, несколько строчек, пока не пришла'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment