Tonight
This commit is contained in:
parent
28323f145e
commit
94f9c0d594
76 changed files with 3238 additions and 1230 deletions
|
|
@ -24,5 +24,20 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script>
|
||||
(function() {
|
||||
var root = document.getElementById('root');
|
||||
if (!root) return;
|
||||
var prerenderPath = root.getAttribute('data-prerender-path');
|
||||
if (!prerenderPath) return;
|
||||
var normalize = function(path) {
|
||||
return path.length > 1 ? path.replace(/\/+$/, '') : '/';
|
||||
};
|
||||
if (normalize(prerenderPath) !== normalize(window.location.pathname || '/')) {
|
||||
root.textContent = '';
|
||||
root.removeAttribute('data-prerender-path');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue