limjeck / osuplus

GNU General Public License v3.0
133 stars 38 forks source link

Reinitialize osuplus after client-side navigation #62

Closed SuperStormer closed 2 years ago

SuperStormer commented 2 years ago

On the new site, osuplus doesn't reinitialize its features when page navigation occurs client-side only.

For example, go to your userpage, click on a beatmap, then press the browser's back button. You can see that none of the detailed stats from osuplus are added to the UI, as the $(document).ready(...) event is only called on page load, not when the navigation is handled by JS.

I believe that this can be solved by reinitializing with the following event listener (or whatever the jQuery equivalent is)

document.addEventListener("turbolinks:load", ...)

(found using getEventListeners(document) from within Chrome DevTools)

SuperStormer commented 2 years ago

fixed by 2.3.8