Skip to content

Instantly share code, notes, and snippets.

@chelovekula
Created August 29, 2019 10:55
Show Gist options
  • Save chelovekula/5d0ea2cc30092535891312549db14d3d to your computer and use it in GitHub Desktop.
Save chelovekula/5d0ea2cc30092535891312549db14d3d to your computer and use it in GitHub Desktop.
canvas_zaloopa
function getCanvasZaloopa() {
try {
var a = document.createElement("canvas").getContext("2d");
a.fillStyle = "rgb(3,3,7)";
a.fillRect(0, 0, 1, 1);
a.fill();
if(3 !== a.getImageData(0, 0, 1, 1).data[0]) {
return true;
}
else {
return false;
}
} catch (a) {
return false;
}
}
getCanvasZaloopa()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment