-
-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e09053b
commit 4e26877
Showing
6 changed files
with
50 additions
and
6 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** @type {PagesFunction} */ | ||
export function onRequest ({ params }) { | ||
try { | ||
const id = Number(params.id) | ||
if (Number.isSafeInteger(id)) { | ||
const html = /* html */`<!DOCTYPE html><html style=background:#000><head><meta http-equiv=refresh content="5; url=https://miru.watch"><meta property="og:title" content="Watch Together"><meta property="og:description" content="Stream anime torrents, real-time with no waiting for downloads"><meta property="og:site_name" content="Miru"><meta property="og:image" content=https://github.com/ThaUnknown/miru/blob/master/docs/show.gif?raw=true><meta property="og:url" content=miru://anime/${id}><meta data-vmid="twitter:card" name="twitter:card" content="summary_large_image"><meta name="theme-color" content="#23a559"></head><body><iframe src=miru://w2g/${id} style=border:none></iframe>Redirecting...</body></html>` | ||
|
||
return new Response(html, { | ||
headers: { | ||
'content-type': 'text/html;charset=UTF-8' | ||
} | ||
}) | ||
} | ||
} catch (e) { | ||
return Response.redirect('https://miru.watch/') | ||
} | ||
return Response.redirect('https://miru.watch/') | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** @type {PagesFunction} */ | ||
export function onRequest ({ params }) { | ||
try { | ||
const id = Number(params.id) | ||
if (Number.isSafeInteger(id)) { | ||
const html = /* html */`<!DOCTYPE html><html style=background:#000><head><meta http-equiv=refresh content="5; url=https://miru.watch"><meta property="og:title" content="Watch Together"><meta property="og:description" content="Stream anime torrents, real-time with no waiting for downloads"><meta property="og:site_name" content="Miru"><meta property="og:image" content=https://github.com/ThaUnknown/miru/blob/master/docs/show.gif?raw=true><meta property="og:url" content=miru://w2g/${id}><meta data-vmid="twitter:card" name="twitter:card" content="summary_large_image"><meta name="theme-color" content="#23a559"></head><body><iframe src=miru://w2g/${id} style=border:none></iframe>Redirecting...</body></html>` | ||
|
||
return new Response(html, { | ||
headers: { | ||
'content-type': 'text/html;charset=UTF-8' | ||
} | ||
}) | ||
} | ||
} catch (e) { | ||
return Response.redirect('https://miru.watch/') | ||
} | ||
return Response.redirect('https://miru.watch/') | ||
} |
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