Permalink
Browse files

Make jshint happy again...

  • Loading branch information...
1 parent d064f3c commit f2d547bd154881a6a630cc75599e90c4985d5643 @vojtajina committed Jun 22, 2012
Showing with 18 additions and 8 deletions.
  1. +9 −3 app/js/app.js
  2. +8 −4 app/js/services/editor.js
  3. +1 −1 grunt.js
View
12 app/js/app.js
@@ -5,6 +5,7 @@ TD.log = angular.module('TD.log', []);
// we ask for editor, to get it instantiated before we load settings,
// because editor register listeners
angular.module('TD', ['TD.app', 'TD.log']).run(function($window, settings, editor, tabs, $rootScope) {
+
// load settings from local storage
settings.load();
tabs.add();
@@ -18,7 +19,10 @@ angular.module('TD', ['TD.app', 'TD.log']).run(function($window, settings, edito
// clipboard - copy, paste, cut
document.getElementById('editor').addEventListener('keydown', function(event) {
- if (!event.metaKey && !event.ctrlKey) return;
+
+ if (!event.metaKey && !event.ctrlKey) {
+ return;
+ }
switch (event.keyCode) {
case KEY.C:
@@ -47,7 +51,9 @@ angular.module('TD', ['TD.app', 'TD.log']).run(function($window, settings, edito
return;
}
- if (!event.metaKey && !event.ctrlKey) return;
+ if (!event.metaKey && !event.ctrlKey) {
+ return;
+ }
switch (event.keyCode) {
case KEY.W:
@@ -81,7 +87,7 @@ angular.module('TD', ['TD.app', 'TD.log']).run(function($window, settings, edito
return Math.max(Math.min(countedWidth + 23, MAX_TAB_SIZE), MIN_TAB_SIZE);
};
- $rootScope.tabWidth = MAX_TAB_SIZE
+ $rootScope.tabWidth = MAX_TAB_SIZE;
$rootScope.$watch(function() { return tabs.length; }, function() {
$rootScope.tabWidth = countTabSize();
View
12 app/js/services/editor.js
@@ -49,9 +49,13 @@ TD.factory('HiddingFolding', function(AceRange) {
while (!cache[row]) {
if (typeof cache[row] === 'undefined') {
- if (row >= session.getLength()) break;
+ if (row >= session.getLength()) {
+ break;
+ }
this.getFoldWidget(session, foldStyle, row);
- if (cache[row]) break;
+ if (cache[row]) {
+ break;
+ }
}
row++;
}
@@ -94,7 +98,7 @@ TD.factory('editor', function(EditSession, HiddingFolding, settings, ace) {
session.setUseSoftTabs(true);
session.setTabSize(tabs);
}
- }
+ };
// listen on settings changes
settings.on('theme', function(theme) {
@@ -139,7 +143,7 @@ TD.factory('editor', function(EditSession, HiddingFolding, settings, ace) {
},
goToLine: function(lineNumber) {
- ace.gotoLine(lineNumber)
+ ace.gotoLine(lineNumber);
},
filter: function(regexp) {
View
2 grunt.js
@@ -53,7 +53,7 @@ module.exports = function(grunt) {
PERSISTENT: true,
FileError: true,
chrome: true,
- WebKitBlobBuilder: true
+ Blob: true
}
},
coffee: {

0 comments on commit f2d547b

Please sign in to comment.