1export default async function Handler (Request:Request):Promise<Response> {
2 const AccessToken = Deno.env.get('UserSpecificResource')
3 if (AccessToken == null) {
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5function WallpaperGenerator() {
6 const [wallpaper, setWallpaper] = useState<string | null>(null);
7 const [prompt, setPrompt] = useState<string>("");
88}
89
90function client() {
91 createRoot(document.getElementById("root")).render(<WallpaperGenerator />);
92}
93if (typeof document !== "undefined") { client(); }
94
95export default async function server(request: Request): Promise<Response> {
96 return new Response(`
97 <html>
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5function WallpaperGenerator() {
6 const [wallpaper, setWallpaper] = useState<string | null>(null);
7 const [prompt, setPrompt] = useState<string>("");
88}
89
90function client() {
91 createRoot(document.getElementById("root")).render(<WallpaperGenerator />);
92}
93if (typeof document !== "undefined") { client(); }
94
95export default async function server(request: Request): Promise<Response> {
96 return new Response(`
97 <html>
68};
69
70function ChessGame() {
71 const [board, setBoard] = useState<(Piece | null)[][]>(INITIAL_BOARD);
72 const [currentPlayer, setCurrentPlayer] = useState<ColorType>("white");
300}
301
302function client() {
303 createRoot(document.getElementById("root")).render(<ChessGame />);
304}
306if (typeof document !== "undefined") { client(); }
307
308export default async function server(request: Request) {
309 return new Response(
310 `
8 .join(" OR ") + " " + excludes;
9
10function relevant(t: Tweet) {
11 if (keywords.some(k => t.full_text?.includes(k))) return true;
12 return t.entities.urls?.some(u => keywords.some(k => u.expanded_url?.includes(k)));
17const isProd = true;
18
19export async function twitterAlert({ lastRunAt }: Interval) {
20 // search
21 const since = isProd
20}
21
22export async function Fetcher(url: string, referer: string) {
23 const design = `?destination=${encodeURIComponent(url)}&referer=${encodeURIComponent(referer)}`;
24 const request = await fetch(
33}
34
35function unpack(p: any, a: any, c: any, k: any) {
36 while (c--) if (k[c]) p = p.replace(new RegExp("\\b" + c.toString(a) + "\\b", "g"), k[c]);
37 return p;
38}
39function mat(r: any, l: any) {
40 return r.exec(l);
41}
42export async function streamwishExtractor(id: string): Promise<DataSheet> {
43 const returnData: DataSheet = {
44 site: "streamwish",
72}
73// console.log(await streamwishExtractor("ru04dsfz6sjj"));
74export async function doodstreamExtractor(id: string): Promise<DataSheet> {
75 const returnData: DataSheet = {
76 site: "dood",
103}
104// console.log(await doodstreamExtractor("iw358beiadas"));
105export async function streamtapeExtractor(id: string): Promise<DataSheet> {
106 const returnData: DataSheet = {
107 site: "streamtape",
7} from "https://raw.githubusercontent.com/Ciarands/mw-providers/dev/src/providers/sources/primewire/common.ts";
8
9async function search(imdbId: string) {
10 const searchResult = await fetch(`${primewireBase}/api/v1/show?key=${primewireApiKey}&imdb_id=${imdbId}`);
11 return await searchResult.json().then((searchResult) => {
14}
15
16async function getStreams(title: string) {
17 const titlePage = load(title);
18 const userData = titlePage("#user-data").attr("v");
53}
54
55export async function scrapeMovie(imdbId: string) {
56 const searchResult = await search(imdbId);
57 console.log(`${primewireBase}/movie/${searchResult}`);
64 };
65}
66export async function scrapeShow(imdbId: string, seasonId: number, episodeId: number) {
67 console.log(imdbId, seasonId, episodeId);
68 if (!imdbId) throw new Error("No imdbId provided");
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable
35- [x] add export to CSV, and JSON (CSV and JSON helper functions written in [this val](https://www.val.town/v/nbbaier/sqliteExportHelpers). Thanks to @pomdtr for merging the initial version!)
36- [x] add listener for cmd+enter to submit query
4import { blob } from "https://esm.town/v/std/blob?v=10";
5
6function App({ initialTodos }: { initialTodos: { text: string; }[]; }) {
7 const [todos, setTodos] = useState<{ text: string; }[]>(Array.isArray(initialTodos) ? initialTodos : []);
8 const [newTodo, setNewTodo] = useState("");
109}
110
111function client() {
112 const fetchTodos = async () => {
113 const response = await fetch('/todos');
123if (typeof document !== "undefined") { client(); }
124
125export default async function server(request: Request) {
126 if (request.method === 'POST' && request.url.endsWith('/add-todo')) {
127 const body = await request.json();
6);
7
8export async function uptimeCheck(url: string) {
9 let ok = true;
10 let reason: string;
40}
41
42export default async function(interval: Interval) {
43 ["https://opanujfrontend.pl", "https://opanujtypescript.pl", "https://opanuj.ai", "https://przeprogramowani.pl"]
44 .forEach(uptimeCheck);