1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-08-01 11:00:28 +02:00

some more eslint fixes 😄

This commit is contained in:
Kushagra Gour
2016-11-15 11:12:35 +05:30
parent 75a57bca03
commit 907903e0ef
2 changed files with 11 additions and 11 deletions

View File

@@ -3,7 +3,7 @@
var noticationContainerEL = $('#js-alerts-container'); var noticationContainerEL = $('#js-alerts-container');
function addNotification(msg) { function addNotification(msg) {
//var n = document.createElement('div'); // var n = document.createElement('div');
// div.textContent = msg; // div.textContent = msg;
// noticationContainerEL.appendChild(n); // noticationContainerEL.appendChild(n);
noticationContainerEL.textContent = msg; noticationContainerEL.textContent = msg;

View File

@@ -162,8 +162,8 @@
return b.updatedOn - a.updatedOn; return b.updatedOn - a.updatedOn;
}); });
items.forEach(function (item) { items.forEach(function (item) {
html += '<a class="js-saved-item-tile saved-item-tile" data-item-id="' + item.id + '">' + html += '<a class="js-saved-item-tile saved-item-tile" data-item-id="' + item.id + '">'
'<h3>' + item.title + '</h3><span>Last updated: ' + item.updatedOn + '</span></a>'; + '<h3>' + item.title + '</h3><span>Last updated: ' + item.updatedOn + '</span></a>';
}) })
savedItemsPane.querySelector('#js-saved-items-wrap').innerHTML = html; savedItemsPane.querySelector('#js-saved-items-wrap').innerHTML = html;
toggleSavedItemsPane(); toggleSavedItemsPane();
@@ -337,7 +337,7 @@
ast = esprima.parse(code, { ast = esprima.parse(code, {
tolerant: true tolerant: true
}); });
} catch(e) { } catch (e) {
showErrors('js', [ { lineNumber: e.lineNumber - 1, message: e.description } ]); showErrors('js', [ { lineNumber: e.lineNumber - 1, message: e.description } ]);
} finally { } finally {
utils.addInfiniteLoopProtection(ast); utils.addInfiniteLoopProtection(ast);
@@ -361,7 +361,7 @@
ast = esprima.parse(code, { ast = esprima.parse(code, {
tolerant: true tolerant: true
}); });
} catch(e) { } catch (e) {
showErrors('js', [ { lineNumber: e.lineNumber - 1, message: e.description } ]); showErrors('js', [ { lineNumber: e.lineNumber - 1, message: e.description } ]);
} finally { } finally {
utils.addInfiniteLoopProtection(ast); utils.addInfiniteLoopProtection(ast);
@@ -394,10 +394,10 @@
}); });
} }
function createPreviewFile(html, css, js) { function createPreviewFile(html, css, js) {
var contents = '<html>\n<head>\n' + var contents = '<html>\n<head>\n'
'<style>\n' + css + '\n</style>\n' + + '<style>\n' + css + '\n</style>\n'
'</head>\n' + + '</head>\n'
'<body>\n' + html + '\n<script>\n' + js + '\n//# sourceURL=userscript.js</script></body>\n</html>'; + '<body>\n' + html + '\n<script>\n' + js + '\n//# sourceURL=userscript.js</script></body>\n</html>';
var fileWritten = false; var fileWritten = false;
@@ -410,8 +410,8 @@
fileEntry.createWriter(function(fileWriter) { fileEntry.createWriter(function(fileWriter) {
function onWriteComplete() { function onWriteComplete() {
if (fileWritten) { if (fileWritten) {
frame.src = 'filesystem:chrome-extension://' + frame.src = 'filesystem:chrome-extension://'
chrome.i18n.getMessage('@@extension_id') + '/temporary/' + 'preview.html'; + chrome.i18n.getMessage('@@extension_id') + '/temporary/' + 'preview.html';
} }
else { else {
fileWritten = true; fileWritten = true;