Make Discourse play nice with the Wayback Machine

Replay is currently broken, the JS runs and the Ember Router breaks due to the pathname change.

Thanks to the improved browser detection from @david, there is an extremely ugly but also tempting fix to get new captures to render properly: just patch browser-detect so it detects the replay and yanks out the noscript version.

https://github.com/riking/discourse/commit/6a83c83bd3acab37f7a3e24f6aa4a14081bb2249

The problem is, if we start serving that script, and by some miracle the JS starts being able to run, all the old archived pages are forced into the no-js view.

Now that I write that out, you know, that’s probably not too bad of a price to pay for getting working archive playbacks today. (Draft PR) I have been talked out of actually doing this.

3 Likes