Skip to content
This repository has been archived by the owner on Mar 16, 2023. It is now read-only.

Commit

Permalink
Cleaned up the code.
Browse files Browse the repository at this point in the history
  • Loading branch information
octalmage committed Feb 1, 2015
1 parent ed5ebae commit e5a7924
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Parse.initialize("VvmNgHcupWn43L9ThaNDiIldMSjOXiLvd7DR7wTq", "DTAv28KMYt5pYlY3Q1
var Parse_Notes = Parse.Object.extend("Notes");
var Private_Parse_Notes = new Parse_Notes();
var syncing;
var wrap=true;
var wrap = true;
var parsenoteid;

var marked = require('marked');
Expand Down Expand Up @@ -108,17 +108,17 @@ marked.setOptions(
highlight: function(code, lang) //use highlight.js for syntax highlighting.
{
if (!lang) return highlight.highlightAuto(code).value;
try
{
content = highlight.highlight(lang, code).value;
}
catch (err)
{
content = highlight.highlightAuto(code).value;
}
return content;
}

try
{
content = highlight.highlight(lang, code).value;
}
catch (err)
{
content = highlight.highlightAuto(code).value;
}
return content;
}
});

$(document).on("click", "list-item", function()
Expand Down Expand Up @@ -223,7 +223,7 @@ $(document).on("ready", function()
}
loadNote(current);

$("#list").scrollTop((current-1)*29)
$("#list").scrollTop((current - 1) * 29);
});

Mousetrap.bind('down', function(e)
Expand All @@ -235,7 +235,7 @@ $(document).on("ready", function()
}
loadNote(current);

$("#list").scrollTop((current-1)*29)
$("#list").scrollTop((current - 1) * 29);
});

Mousetrap.bind('esc', function()
Expand Down Expand Up @@ -302,7 +302,7 @@ $(document).on("ready", function()
login(n.username, n.password);
$("#syncing").prop("checked", true);
}
if (wrap===true)
if (wrap === true)
{
editor.getSession().setUseWrapMode(true);
$("#wrap").prop("checked", true);
Expand Down Expand Up @@ -361,14 +361,14 @@ $(document).on("ready", function()
key: 'settings',
username: username,
password: password,
wrap: wrap,
wrap: wrap,
syncing: syncing
});
if (syncing === true)
{
login(username, password);
}
if (wrap===true)
if (wrap === true)
{
editor.getSession().setUseWrapMode(true);
}
Expand Down

0 comments on commit e5a7924

Please sign in to comment.