Last active
May 4, 2024 09:42
-
-
Save FlameWolf/75347dda31f3029249a56cc7f4e2110d to your computer and use it in GitHub Desktop.
Get content from KKS
This file contains 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
copy((function() { | |
const contentParagraphs = [ | |
...document.querySelectorAll("#main > #content > article > .entry-content > p"), | |
...document.querySelectorAll("div.entry-content > div:not(#widgets-wrap-before-post-content)") | |
]; | |
return contentParagraphs | |
.filter(x => x.getAttribute("role") !== "navigation") | |
.reduce((acc, value) => acc + "\n" + value.textContent, ""); | |
})()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment