diff --git a/docs/setup/adding-a-comment-system.md b/docs/setup/adding-a-comment-system.md index 7f1f0b9dd..ee4898ecf 100644 --- a/docs/setup/adding-a-comment-system.md +++ b/docs/setup/adding-a-comment-system.md @@ -71,9 +71,8 @@ calling the `super()` function at the beginning of the block: /* Register event handlers after documented loaded */ document.addEventListener("DOMContentLoaded", function() { var ref = document.querySelector("[data-md-component=palette]") - component$.subscribe(function (component) { - if (component.ref === ref) - location.reload() + ref.addEventListener("change", function() { + location.reload() }) }) diff --git a/material/overrides/blog.html b/material/overrides/blog.html index da3d400aa..4b177e7e0 100644 --- a/material/overrides/blog.html +++ b/material/overrides/blog.html @@ -6,5 +6,5 @@ {{ super() }}