()
| 106 | } |
| 107 | |
| 108 | async function mangapark() { |
| 109 | const response = await fetch('https://mangaparkmirrors.pages.dev'); |
| 110 | const body = await response.text(); |
| 111 | |
| 112 | const jsonMatch = body.match(/const domains = (\[.*?\]);/s); |
| 113 | if (!jsonMatch) { |
| 114 | throw new Error('No domains found'); |
| 115 | } |
| 116 | |
| 117 | const urls = [...jsonMatch[1].matchAll(/"https?:\/\/(.*?)"/g)].map(match => { |
| 118 | return new URL(match[0].replace(/"/g, '')); |
| 119 | }); |
| 120 | |
| 121 | let formattedUrls = []; |
| 122 | for (const url of urls) { |
| 123 | formattedUrls.push('*://' + url.hostname + '/*'); |
| 124 | } |
| 125 | addChibiUrls('MangaPark', formattedUrls); |
| 126 | } |
| 127 | |
| 128 | function addPageUrls(page, urls) { |
| 129 | logFoundUrls(page, urls, URL_TYPES.PAGE); |
nothing calls this directly
no test coverage detected