IE11 Reader View

A couple weeks ago I wrote about a number of things in Internet Explorer 11 that I had to learn. Well, since then I've learned a couple more things. 

First off, in reader view, if you have the skip ahead featured enabled, Reader view will actually skip ahead for you and preload the pages in reader view as well. This can be a bit problematic as you may have multipage articles, but you may also have skip ahead to unrelated articles as well, which could be disorienting. But you may want both features implemented at the same time. 

Well, I tried a couple of different approaches to make this happen. 

First, I tried to hook into the event that fired when you pulled up reader view. While, IE11 has a bunch of events tied to pinning sites, I couldn't find any events that fired when launching reader view. They might be out there, so if that's the case, I'd love to hear it. 

So I tried onfocus or onblur events, which weren't firing at the right time. I was hoping that I could follow these events and then remove the rel="next" attributes so the next page fo reader view wouldn't load. I noticed even on sites like MSN that reader view actually removed the ability to swipe ahead anyhow.

Second, I looked around and found a Stack Overflow article that mentioned that <pre> tags prevented reader view, saying this was a bug. I disagree, I think this is intentional as it completely ruins the point of <pre>. Regardless, this led me to realize that if I had a <pre> tag,  I could prevent reader view from working when the reader looked ahead at the next page. Thus, I added a <pre> tag to every page. 

This doesn't break reader view if I remove the <pre> tag as the page loads using JS.

So now I have reader view for the page I'm on, but because the <pre> tag on every page I'm not on prevents reader view, I still get swipe ahead without getting look ahead reader view.