This file contains hidden or 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
(function init() { | |
function processAndFilterLoAFs(entries) { | |
function floorObject(o) { | |
return Object.fromEntries(Array.from(Object.entries(o)).map(([key, value]) => [key, typeof value === "number" ? Math.floor(value) : | |
value | |
])) | |
} | |
function processEntry(entry) { | |
const startTime = entry.startTime; |
This file contains hidden or 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
<!DOCTYPE html> | |
<head> | |
<meta name="view-transition" content="same-origin"> | |
</head> | |
<body> | |
<style> | |
h1 { | |
view-transition-name: hero; | |
} |
This file contains hidden or 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
class UserlandPendingBeacon { | |
#abortController = null; | |
// Let's imagine it's a list of plain objects. | |
#pendingEntries = []; | |
// URL, headers, defer options etc | |
#requestInit; | |
constructor(requestInit) { |
This file contains hidden or 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
function parseHTML(getNextElement) { | |
let doneParsing = null; | |
const whenDoneParsing = new Promise(resolve => { doneParsing = resolve; }); | |
while (const element = getNextElement()) { | |
if (element.tagName !== "SCRIPT") { | |
// parse everything else... | |
continue; | |
} |
This file contains hidden or 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
addEventListener("fetch", e => { | |
if (e.request.destination !== "image" || // Only do this when requesting an image | |
request.mode === "no-cors") // We don't know the status of no-cors images | |
return; | |
e.respondWith((async () => { | |
try { | |
const response = await fetch(e.request); | |
if (response.ok) | |
return response; |
This file contains hidden or 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
export function supportsExifResolution() { | |
return new Promise((resolve, reject) => { | |
const image = new Image(); | |
image.src = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAGAAkAAD/4QCwRXhpZgAATU0AKgAAAAgABQEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAAITAAMAAAABAAEAAIdpAAQAAAABAAAAWgAAAAAAAAAYAAAAAQAAACQAAAABAAaQAAAHAAAABDAyMzKRAQAHAAAABAECAwCgAAAHAAAABDAxMDCgAQADAAAAAf//AACgAgADAAAAAQADAACgAwADAAAAAQACAAAAAAAA/9sAQwABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB/9sAQwEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB/8AAEQgAAQABAwERAAIRAQMRAf/EABQAAQAAAAAAAAAAAAAAAAAAAAr/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/AH8A/9k=" | |
image.onload = () => { | |
if (image.naturalWidth === 3 && image.naturalHeight === 2) | |
resolve() | |
else | |
reject("EXIF resolution is not supported") | |
} |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
[ | |
{"computedWidth":188,"computedHeight":50,"naturalWidth":188,"naturalHeight":50,"src":"http://ak2.imgaft.com/images/new_logo_GDTrans.png","htmlWidth":null,"htmlHeight":null,"styleWidth":"","styleHeight":"","website":"http://techbays.com/2008/03/10/why-is-redtube-popular/"}, | |
{"computedWidth":240,"computedHeight":134,"naturalWidth":240,"naturalHeight":134,"src":"http://ak2.imgaft.com/images/feature-illu-dot-com-domain.png","htmlWidth":null,"htmlHeight":null,"styleWidth":"","styleHeight":"","website":"http://techbays.com/2008/03/10/why-is-redtube-popular/"}, | |
{"computedWidth":244,"computedHeight":19,"naturalWidth":244,"naturalHeight":19,"src":"http://parked-content.godaddy.com/images/99C_code.png","htmlWidth":null,"htmlHeight":null,"styleWidth":"","styleHeight":"","website":"http://techbays.com/2008/03/10/why-is-redtube-popular/"}, | |
{"computedWidth":1,"computedHeight":1,"naturalWidth":1,"naturalHeight":1,"src":"http://techbays.com/img.aspx?q=L3MkWGAkBQt0AGR5ZmHmZGL5ZmL1ZmR1AlHlAzpyZ3R1ZQNkWGV2MFHmpFHlAz4yZ3RjWGV2 |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
[{"computedWidth":88,"computedHeight":31,"naturalWidth":88,"naturalHeight":31,"src":"https://www.wikidata.org/static/images/poweredby_mediawiki_88x31.png","website":"https://www.wikidata.org/wiki/Q35127"}, | |
{"computedWidth":88,"computedHeight":31,"naturalWidth":88,"naturalHeight":31,"src":"https://www.wikidata.org/static/images/wikimedia-button.png","website":"https://www.wikidata.org/wiki/Q35127"}, | |
{"computedWidth":220,"computedHeight":260,"naturalWidth":220,"naturalHeight":260,"src":"https://upload.wikimedia.org/wikipedia/commons/thumb/d/de/Www.wikipedia.org_screenshot.png/220px-Www.wikipedia.org_screenshot.png","website":"https://www.wikidata.org/wiki/Q35127"}, | |
{"computedWidth":110,"computedHeight":58,"naturalWidth":110,"naturalHeight":58,"src":"https://upload.wikimedia.org/wikipedia/commons/thumb/0/0e/Wiki_Loves_Women_South_Asia_Logo-pa.png/110px-Wiki_Loves_Women_South_Asia_Logo-pa.png","website":"https://pa.wikipedia.org/wiki/%E0%A8%AA%E0%A9%8D%E0%A8%B0%E0%A8%B8%E0%A8%BF%E0%A9%B1%E0%A8%A7_%E0% |
This file contains hidden or 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
#include <AxisJoystick.h> | |
// these constants won't change: | |
const int piezo1 = A0; // the piezo is connected to analog pin 0 | |
const int piezo2 = A1; // the piezo is connected to analog pin 0 | |
const int piezo3 = A2; // the piezo is connected to analog pin 0 | |
const int piezo4 = A3; // the piezo is connected to analog pin 0 | |
const int minValue = 384; // threshold value to decide when the detected sound is a knock or not | |
const int maxValue = 1024; |
This file contains hidden or 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
await page.evaluate((x, y) => window.scrollBy(x, y), x, y) |