Tweak pagination.html.
Check for `window.localStorage` before using it.