Skip to content

Commit a47178c

Browse files
committed
revert to single quotes
1 parent db06897 commit a47178c

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

exercises/55 - Face Detection Censorship/pixelated-face-DEMO.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
// it's possible that it won't work for you at the moment.
44

55
const faceDetector = new window.FaceDetector();
6-
const video = document.querySelector("video.webcam");
7-
const canvas = document.querySelector("canvas.video");
8-
const ctx = canvas.getContext("2d");
9-
const faceCanvas = document.querySelector("canvas.face");
10-
const faceCtx = faceCanvas.getContext("2d");
6+
const video = document.querySelector('video.webcam');
7+
const canvas = document.querySelector('canvas.video');
8+
const ctx = canvas.getContext('2d');
9+
const faceCanvas = document.querySelector('canvas.face');
10+
const faceCtx = faceCanvas.getContext('2d');
1111
const SCALE = 1.2;
1212
const SIZE = 10;
1313

@@ -68,7 +68,7 @@ function censor({ boundingBox: face }) {
6868
}
6969
function drawFace(face) {
7070
const { width, height, top, left } = face.boundingBox;
71-
ctx.strokeStyle = "#ffc600";
71+
ctx.strokeStyle = '#ffc600';
7272
ctx.lineWidth = 1;
7373
ctx.strokeRect(left, top, width, height);
7474
ctx.stroke();

exercises/55 - Face Detection Censorship/pixelated-face-FINISHED.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
// If you are getting a `Face detection service unavailable` error or similar,
33
// it's possible that it won't work for you at the moment.
44

5-
const video = document.querySelector(".webcam");
6-
const canvas = document.querySelector(".video");
7-
const ctx = canvas.getContext("2d");
8-
const faceCanvas = document.querySelector(".face");
9-
const faceCtx = faceCanvas.getContext("2d");
5+
const video = document.querySelector('.webcam');
6+
const canvas = document.querySelector('.video');
7+
const ctx = canvas.getContext('2d');
8+
const faceCanvas = document.querySelector('.face');
9+
const faceCtx = faceCanvas.getContext('2d');
1010
const faceDetector = new window.FaceDetector();
1111
const optionsInputs = document.querySelectorAll(
1212
'.controls input[type="range"]'
@@ -21,7 +21,7 @@ function handleOption(event) {
2121
const { value, name } = event.currentTarget;
2222
options[name] = parseFloat(value);
2323
}
24-
optionsInputs.forEach((input) => input.addEventListener("input", handleOption));
24+
optionsInputs.forEach((input) => input.addEventListener('input', handleOption));
2525

2626
// Write a fucntion that will populate the users video
2727
async function populateVideo() {
@@ -49,7 +49,7 @@ async function detect() {
4949
function drawFace(face) {
5050
const { width, height, top, left } = face.boundingBox;
5151
ctx.clearRect(0, 0, canvas.width, canvas.height);
52-
ctx.strokeStyle = "#ffc600";
52+
ctx.strokeStyle = '#ffc600';
5353
ctx.lineWidth = 2;
5454
ctx.strokeRect(left, top, width, height);
5555
}

0 commit comments

Comments
 (0)