JSFiddle - React, Tailwind, and code Playground
by icodeforlove
JavaScript
function BrowserTracker (results) {
this._results = results;
this._canvas = document.createElement('canvas');
this._context = this._canvas.getContext('2d');
this._canvas.width = 700;
this._canvas.height = 225;
this._canvas.style.position = 'fixed';
this._canvas.style.bottom = 0;
document.body.appendChild(this._canvas);
this._browsersImage = new Image();
this._browsersImage.addEventListener('load', this._draw.bind(this), false);
this._browsersImage.src = this._browsersImageData;
this._osNameWidth = 100;
this._osNameRightMargin = 5;
this._iconSize = 32;
this._iconLeftMargin = 5;
this._rowTopMargin = 5;
}
BrowserTracker.prototype = {
_browsersImageData:...