Show HN: Fastr – Reload Optimizing Chrome Extension
github.com
github.com
The downside is that all your scripts can't depend directly on 'DOMContentLoaded' or jQuery.ready. This isn't much of a problem if you're using a framework where navigation is abstracted away anyway, but third-party software can still get messed up.
I was surprised that the extension didn't interfere with my Ember.js app, but then disappointed when it prevented Leaflet from working across navigations. I honestly don't know why that would be the case since my app already does its own navigation without page reloads.
$(document).on('turbolinks:load', insertFunctionHere);
Then you should be good to go in terms of loading functions after the trubolink(s). There should be a way to reverse this for this application. I personally, don't know -_-
It would be nice to have a piece of code that detects the problem and shows a message "Hey, you have a browser extension that is not playing nice with this website; please turn the extension off".
What would that piece of code look like?
Hell, there are already enough problems with working around naive ad blockers (images being blocked because they have their dimensions listed in the file name, `class="ad"` being hard blocked, etc). At least those extensions are popular enough to matter and break fairly infrequently.
Of course, I would eventually have to track down why some images weren't loading for a lot of users. Took me a moment to notice the `/ad/...`.
Please contribute with any sites which fastr has broken.
Also I'm assuming this works similar to the Rails gem turbolinks?
I've used the turbolinks script from that repo.