blob_adminindex2 matches
61const { ValTown } = await import("npm:@valtown/sdk");
62const vt = new ValTown();
63const { email: authorEmail, profileImageUrl, username } = await vt.me.profile.retrieve();
64// const authorEmail = me.email;
65129130c.set("email", email);
131c.set("profile", { profileImageUrl, username });
132await next();
133};
blob_adminREADME.md1 match
3This is a lightweight Blob Admin interface to view and debug your Blob data.
45
67To use this, fork it to your account.
ptcWebsiteDemomain.tsx1 match
173<title>PTC Network</title>
174<meta name="viewport" content="width=device-width, initial-scale=1">
175<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>💰</text></svg>">
176</head>
177<body style="margin:0">
websitesSeoAnalyzermain.tsx2 matches
47<p>🔗 Meta Description: {seoResults.metaDescriptionLength} characters</p>
48<p>🏷️ Headings: {seoResults.headingsCount} found</p>
49<p>🖼️ Images without Alt Text: {seoResults.imagesWithoutAlt}</p>
50<a
51href={import.meta.url.replace("esm.town", "val.town")}
81metaDescriptionLength: doc.querySelector('meta[name="description"]')?.getAttribute('content')?.length || 0,
82headingsCount: doc.querySelectorAll('h1, h2, h3').length,
83imagesWithoutAlt: Array.from(doc.images).filter(img => !img.alt).length
84};
85
3Feel free to mess around with this val and make it your own :). Just click on "Fork" in the top right.
45You can change the phrases that show up as you click no, you can change the firstImg and secondImg, maybe even add more images. And you can also change the colors and any of the text on the screen!
67Have fun with it and hopefully your crush says yes hehe.
brightEmeraldQuokkaREADME.md1 match
3Feel free to mess around with this val and make it your own :). Just click on "Fork" in the top right.
45You can change the phrases that show up as you click no, you can change the firstImg and secondImg, maybe even add more images. And you can also change the colors and any of the text on the screen!
67Have fun with it and hopefully your crush says yes hehe.
imageToWebPConvertermain.tsx16 matches
45function App() {
6const [imageUrl, setImageUrl] = useState(null);
7const [webpUrl, setWebpUrl] = useState(null);
8const [originalSize, setOriginalSize] = useState(null);
15const reader = new FileReader();
16reader.onload = (e) => {
17setImageUrl(e.target.result);
18setOriginalSize(formatSize(file.size));
19};
2324const convertToWebP = () => {
25if (!imageUrl) return;
2627const img = new Image();
28img.onload = () => {
29const canvas = document.createElement('canvas');
31canvas.height = img.height;
32const ctx = canvas.getContext('2d');
33ctx.drawImage(img, 0, 0);
34
35canvas.toBlob((blob) => {
37setWebpUrl(url);
38setWebpSize(formatSize(blob.size));
39}, 'image/webp');
40};
41img.src = imageUrl;
42};
4344const deleteImages = () => {
45setImageUrl(null);
46setWebpUrl(null);
47setOriginalSize(null);
62return (
63<div className="container">
64<h1>Image to WebP Converter</h1>
65<input
66type="file"
67accept="image/*"
68onChange={handleFileChange}
69ref={fileInputRef}
70/>
71{imageUrl && (
72<div>
73<img src={imageUrl} alt="Original" className="preview" />
74<p>Original Size: {originalSize}</p>
75<button onClick={convertToWebP}>Convert to WebP</button>
83</div>
84)}
85{(imageUrl || webpUrl) && (
86<button onClick={deleteImages} className="delete-btn">Delete Images</button>
87)}
88<p className="footer">
106<meta charset="UTF-8">
107<meta name="viewport" content="width=device-width, initial-scale=1.0">
108<title>Image to WebP Converter</title>
109<style>${css}</style>
110</head>
parseImportMetaproject.test1 match
169{
170headers: {
171"content-type": "image/svg+xml;charset=UTF-8",
172},
173},
28src="https://maxm-imggenurl.web.val.run/profile-picture"
29alt="Profile"
30className="profile-image"
31/>
32<h1>Your Name</h1>
103}
104105.profile-image {
106width: 120px;
107height: 120px;