Skip to content

Instantly share code, notes, and snippets.

View philipproth's full-sized avatar

Philipp Roth philipproth

View GitHub Profile
const PRERENDER_TOKEN = 'your_prerender_token';
const PRERENDER_URL = 'https://service.prerender.io/';
async function handleRequest(request) {
const url = new URL(request.url);
if (shouldPrerender(request)) {
const prerenderUrl = PRERENDER_URL + url.href + '?token=' + PRERENDER_TOKEN;
const prerenderResponse = await fetch(prerenderUrl);
return new Response(prerenderResponse.body, {
<style>
.paragraph, p, h1, h2, h3, .toc {
word-break: break-word;
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
}
<style>
html.wf-loading * {
opacity: 0;
}
</style>
<style type="text/css">
/*<![CDATA[*/
/* Hide the read more button at blog posts */
#cc-m-1.j-module > p {display: none !important;} /*Ausblenden des "mehr lesen" links unterhalb den Blogbeiträgen*/
#cc-m-1.j-module > p {color: #ffffff !important;}
.footer-btm {background-color: #ffffff !important;}
/* --------- */