Conflicts: CHANGELOG.md css/style.css package.json src/General/Build.coffee src/General/Main.coffee src/Images/ImageExpand.coffee src/Images/ImageHover.coffee src/Monitoring/ThreadUpdater.coffee
15 lines
392 B
CoffeeScript
Executable File
15 lines
392 B
CoffeeScript
Executable File
Polyfill =
|
|
init: ->
|
|
<% if (type === 'crx') { %>
|
|
@toBlob()
|
|
<% } %>
|
|
toBlob: ->
|
|
HTMLCanvasElement::toBlob or= (cb) ->
|
|
data = atob @toDataURL()[22..]
|
|
# DataUrl to Binary code from Aeosynth's 4chan X repo
|
|
l = data.length
|
|
ui8a = new Uint8Array l
|
|
for i in [0...l] by 1
|
|
ui8a[i] = data.charCodeAt i
|
|
cb new Blob [ui8a], type: 'image/png'
|