Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: ports/libgit2-demo/libgit2.js

Issue 1415743013: Run jshint over all JavaScript files (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@repo_conf
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ports/gtk-demo/Xsdl.js ('k') | ports/lua/lua.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 The Native Client Authors. All rights reserved. 2 * Copyright 2014 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 'use strict'; 7 'use strict';
8 function runGitCmd(message, arg1, arg2) { 8 function runGitCmd(message, arg1, arg2) {
9 var dir = document.getElementById('directory').value; 9 var dir = document.getElementById('directory').value;
10 if (arg2 && arg1) 10 if (arg2 && arg1)
11 embed.postMessage([message, dir, arg1, arg2]); 11 window.embed.postMessage([message, dir, arg1, arg2]);
12 else if (arg1) 12 else if (arg1)
13 embed.postMessage([message, dir, arg1]); 13 window.embed.postMessage([message, dir, arg1]);
14 else 14 else
15 embed.postMessage([message, dir]); 15 window.embed.postMessage([message, dir]);
16 } 16 }
17 17
18 function clone() { 18 function clone() {
19 var url = document.getElementById('clone_url').value; 19 var url = document.getElementById('clone_url').value;
20 runGitCmd('clone', url); 20 runGitCmd('clone', url);
21 } 21 }
22 22
23 function chdir() { 23 function chdir() {
24 runGitCmd('chdir'); 24 runGitCmd('chdir');
25 } 25 }
(...skipping 23 matching lines...) Expand all
49 } 49 }
50 50
51 function handleMessage(message) { 51 function handleMessage(message) {
52 var output = document.getElementById('output'); 52 var output = document.getElementById('output');
53 output.value += message.data; 53 output.value += message.data;
54 output.scrollTop = output.scrollHeight; 54 output.scrollTop = output.scrollHeight;
55 } 55 }
56 56
57 function onLoad() { 57 function onLoad() {
58 window.embed = document.getElementById('nacl_module'); 58 window.embed = document.getElementById('nacl_module');
59 embed.addEventListener('message', handleMessage, true); 59 window.embed.addEventListener('message', handleMessage, true);
60 document.getElementById('init').addEventListener('click', init); 60 document.getElementById('init').addEventListener('click', init);
61 document.getElementById('clone').addEventListener('click', clone); 61 document.getElementById('clone').addEventListener('click', clone);
62 document.getElementById('status').addEventListener('click', status); 62 document.getElementById('status').addEventListener('click', status);
63 document.getElementById('mount').addEventListener('click', mount); 63 document.getElementById('mount').addEventListener('click', mount);
64 document.getElementById('push').addEventListener('click', push); 64 document.getElementById('push').addEventListener('click', push);
65 document.getElementById('commit').addEventListener('click', commit); 65 document.getElementById('commit').addEventListener('click', commit);
66 } 66 }
67 67
68 window.onload = onLoad; 68 window.onload = onLoad;
OLDNEW
« no previous file with comments | « ports/gtk-demo/Xsdl.js ('k') | ports/lua/lua.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698