cryogen icon indicating copy to clipboard operation
cryogen copied to clipboard

Auto-refresh feature doesn't work with Nucleus template.

Open jumarko opened this issue 2 years ago • 1 comments

As discussed on Slack (https://clojurians.slack.com/archives/C0M8UK760/p1644436501870119?thread_ts=1644318541.889299&cid=C0M8UK760) the ring's auto-refresh functionality doesn't work because nucleaus uses custom window.onload function.

I fixed this in my clone by commenting out this portion of the Nucleus template: https://github.com/curiousprogrammer-net/curiousprogrammer.blog/pull/27/commits/fe121413844ea761f0eedffc94c6ccc18c8c7e6e However, I'm not sure what's the proper way to do this generically so I've just created this issue without submitting a PR.

jumarko avatar Feb 09 '22 20:02 jumarko

IMO the correct fix would be to call also the previous onload:

const oldOnload = window.onload;
window.onload = () => { if (oldOnload) oldOnload(); externalLinks(); }

would you care to send a Pr with that? 🙏

holyjak avatar Mar 04 '22 08:03 holyjak