This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<content-section | |
[csTitle]="title" | |
[collapsible]="collapsible" | |
[state]="state" | |
[locked]="locked" | |
[noButtons]="noButtons" | |
[buttons]="_buttons" | |
> | |
<!-- Custom controls --> | |
<ng-content></ng-content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const TMDB_IMAGE_BASE_URL = 'https://image.tmdb.org/t/p/'; | |
addEventListener("fetch", e => { | |
const url = new URL(e.request.url); | |
if (url.pathname === "/image") { | |
e.respondWith((async () => { | |
const width = url.searchParams.get("width"); | |
const path = url.searchParams.get("path"); | |
try { | |
return await fetch(`${TMDB_IMAGE_BASE_URL}/w${width}${path}`, {mode: "no-cors"}); |
OlderNewer