Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaapmarcus/wp-infinite-scroll
https://github.com/jaapmarcus/wp-infinite-scroll
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jaapmarcus/wp-infinite-scroll
- Owner: jaapmarcus
- Created: 2024-03-01T11:53:28.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-06-27T11:35:22.000Z (5 months ago)
- Last Synced: 2024-10-12T04:31:10.947Z (about 1 month ago)
- Language: PHP
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wp-infinite-scroll
How to call new functions after update is present
```js
let previousUrl = location.href;
let observer = new MutationObserver(function (mutations) {
if (location.href !== previousUrl) {
previousUrl = location.href;
//here your code
}
});
const config = {subtree: true, childList: true};
observer.observe(document, config);
```## Manually changes required:
On line 42 on scroll.js edit the div where the post content is from for example:
```
dom = htmlDocument.documentElement.querySelector(".td-post-content");
```## Notes
When using incombination with AdSight rename previousUrl to something else