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
// draw the data-uri image on the canvas | |
function a(e) { | |
if (e.getAttribute("data-src")) { | |
var t = new Image; | |
t.src = e.getAttribute("data-src"); | |
var i = e.getAttribute("width") | |
, n = e.getAttribute("height") | |
, o = e.getContext("2d"); | |
t.addEventListener("load", function() { | |
o.drawImage(t, 0, 0, i, n) |
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
<div class="qtext_image_wrapper"> | |
<!-- a canvas with a data-uri containing the thumbnail --> | |
<!-- which is in PNG format and very small (in this page 6x10 px) --> | |
<canvas class="qtext_image_placeholder portrait qtext_image zoomable_in zoomable_in_feed" | |
width="499" | |
height="874" | |
data-src="data:image/PNG;base64,UklGRmgAAABXRUJQVlA4IFwAAADwAQCdASoGAAoAAUAmJYgCdEf/g…iD0z/yA/5ipcuk5xHSdrS38j8CkH7s+vKeZu9EwRy0f/KPIlo/+UifdfcpiRcJiRnXXAAAAA=="> | |
</canvas> | |
<!-- a lazy image with src set as data-src and master_src --> | |
<!-- data-src is a webp image (at least when requested using Chrome). --> |
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
<figure class="progressive-image featured-image size-extra-large"> | |
<!-- a picture element with intrinsic ratio --> | |
<picture style="padding-bottom: 56.1875%; background-image: url(https://qzprod.files.wordpress.com/2017/01/fish.jpg?quality=80&strip=all&w=50);"> | |
<!-- the small image that will be blurred --> | |
<img src="https://qzprod.files.wordpress.com/2017/01/fish.jpg?quality=80&strip=all&w=50" class="progressive-image-thumbnail"> | |
<!-- a lazy responsive image with data-srcset --> | |
<img | |
itemprop="image" | |
data-srcset="https://qzprod.files.wordpress.com/2017/01/fish.jpg?quality=80&strip=all&w=320 320w, https://qzprod.files.wordpress.com/2017/01/fish.jpg?quality=80&strip=all&w=640 640w, https://qzprod.files.wordpress.com/2017/01/fish.jpg?quality=80&strip=all&w=940 940w, https://qzprod.files.wordpress.com/2017/01/fish.jpg?quality=80&strip=all&w=1600 1600w, https://qzprod.files.wordpress.com/2017/01/fish.jpg?quality=80&strip=all&w=3200 3200w" | |
data-src="https://qzprod.files.wordpres |
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
getStreamForCamera().then(streamCamera => { | |
// we know have access to the camera, let's append it to the DOM | |
appendCamera(streamCamera); | |
getStreamForWindow().then(streamWindow => { | |
// we now have access to the screen too | |
// we generate a combined stream with the video from the | |
// screen and the audio from the camera | |
var finalStream = new MediaStream(); | |
const videoTrack = streamWindow.getVideoTracks()[0]; | |
finalStream.addTrack(videoTrack); |
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
// we ask for permission to record the window | |
// mediaSource could also be 'screen' if we wanted | |
// to record the entire screen | |
const getStreamForWindow = () => navigator.mediaDevices.getUserMedia({ | |
video: { | |
mediaSource: 'window' | |
} | |
}); | |
// we ask for permission to record the audio and video from the camera | |
const getStreamForCamera = () => navigator.mediaDevices.getUserMedia({ |
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
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> | |
<style> | |
a { | |
display: block; | |
padding: 1em; | |
} | |
</style> | |
</head> |
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
{ | |
"name": "iso-http", | |
... | |
"main": "js/node/Http.js", | |
"browser": "js/browser/Http.js", | |
... | |
} |
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
{ | |
"name": "superagent", | |
... | |
"browser": { | |
"./lib/node/index.js": "./lib/client.js", | |
... | |
}, | |
... | |
"main": "./lib/node/index.js", | |
... |
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
<html> | |
<body> | |
Here is my SPB | |
<iframe src="https://open.jperez.cloud.spotify.net/embed/track/0TTGOEUDTC9oNsVZrpOk7s"></iframe> | |
</body> | |
</html> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Coldplay on Spotify</title> | |
<meta http-equiv="X-UA-Compatible" content="IE=9"> | |