Skip to content

Commit

Permalink
deploy: 88e5630
Browse files Browse the repository at this point in the history
  • Loading branch information
ColeDCrawford committed Jan 18, 2024
1 parent 893463e commit eb69642
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifest_nagdYJT3.mjs → manifest_DbcBt1P-.mjs

Large diffs are not rendered by default.

27 changes: 26 additions & 1 deletion scrolls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,32 @@
element: "#search",
pageSize: 25,
showImages: false,
showEmptyFilters: false
showEmptyFilters: false,
// resetStyles: false
});

// pageFind resetStyles looks weird; we can't style a result directly without it;
// we can't apply styles directly because the elements don't exist until the search is run.
// Instead we'll use a MutationObserver to apply styles to the results after they're created.
// Create a new MutationObserver instance
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
if (mutation.addedNodes.length) {
mutation.addedNodes.forEach(function(node) {
// Check if the added node has the class 'pagefind-ui__result'
if (node.classList && node.classList.contains('pagefind-ui__result')) {
node.style.overflowWrap = 'anywhere';
}
});
}
});
});

// Configuration of the observer:
var config = { childList: true, subtree: true };

// Start observing the body for added nodes
observer.observe(document.body, config);

});
</script>

0 comments on commit eb69642

Please sign in to comment.