Modified the drawScale function to set the background color to the background of the page in order to keep it when it's shared to Facebook.
Added base64 encoding and functions to share the canvas image to Facebook without saving first.