Skip to content

Instantly share code, notes, and snippets.

View YEK-PLUS's full-sized avatar

Yunus Emre YEK-PLUS

  • İzmir-Prizren-London
View GitHub Profile
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
//Source: http://stackoverflow.com/questions/6150289/how-to-convert-image-into-base64-string-using-javascript
$( "#imagetourl" ).click(function() {
function toDataUrl(url, callback) {
var xhr = new XMLHttpRequest();
xhr.onload = function() {
var reader = new FileReader();
reader.onloadend = function() {
callback(reader.result);
}