Clickb8io art script

'=' to max out drawing cursor

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Clickb8io art script
// @namespace    http://tampermonkey.net/
// @version      1.01
// @description  '=' to max out drawing cursor
// @author       meatman2tasty
// @match        http://clickb8.io/*
// @grant        none
// ==/UserScript==

document.addEventListener("keydown", function(a) { // press 'x' to fill chat
    if (a.keyCode == 187) {
        mainContext.lineWidth = 2000;
    }
}, false);

var imageLoader = document.createElement('input');
imageLoader.type = "file"
imageLoader.addEventListener('change', handleImage, false);
var canvas = document.getElementById('thumbnailPaintCanvas');
var ctx = canvas.getContext('2d');
function handleImage(e){
    var reader = new FileReader();
    reader.onload = function(event){
        var img = new Image();
        img.onload = function(){
            canvas.width = img.width;
            canvas.height = img.height;
            ctx.drawImage(img,0,0);
        }
        img.src = event.target.result;
    }
    reader.readAsDataURL(e.target.files[0]);     
}
document.getElementById('createVideoContainer').appendChild(imageLoader);