Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Move more things into app.js

  • Loading branch information...
commit 41bbfa76f84bc324935e5f234afb829e6c5cd2d9 1 parent 0ee38e2
@mrdomino authored
Showing with 23 additions and 20 deletions.
  1. +0 −16 app.html
  2. +2 −0  app.js
  3. +2 −1  deps.js
  4. +1 −1  externs.js
  5. +16 −0 ga.js
  6. +2 −2 makefile
View
16 app.html
@@ -10,21 +10,6 @@
h1, h2 { border-bottom: 1px solid }
label, input { display: block }
</style>
-<script type="text/javascript">
-
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-28049294-1']);
- _gaq.push(['_setDomainName', 'github.com']);
- _gaq.push(['_setAllowLinker', true]);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-
-</script>
<body>
<h1><abbr title="Shamir’s Secret Sharing Scheme">SSSS</abbr> Lockbox</h1>
@@ -82,7 +67,6 @@
</div>
<script>
try {
- document.getElementById('err-div').style.display = 'none';
app.run();
} catch(e) {
var errmsg = typeof e.message == 'undefined' ? e : e.message;
View
2  app.js
@@ -1,5 +1,6 @@
goog.provide('app');
+goog.require('ga');
goog.require('ssss');
goog.require('message');
goog.require('goog.array');
@@ -34,6 +35,7 @@ app.handler_ = new goog.debug.ErrorHandler(app.errFunc);
app.run = function() {
var $ = goog.dom.getElement;
+ app.clearError();
var wrapped_split = app.handler_.wrap(ssss.split);
var wrapped_combine = app.handler_.wrap(ssss.combine);
goog.events.listen($('split'), goog.events.EventType.CLICK, function(e) {
View
3  deps.js
@@ -1,7 +1,8 @@
// This file was autogenerated by ../closure-library/closure/bin/build/depswriter.py.
// Please do not edit.
-goog.addDependency('../../../lockbox/app.js', ['app'], ['goog.array', 'goog.crypt.base64', 'goog.debug.ErrorHandler', 'goog.dom', 'goog.events', 'goog.events.EventHandler', 'goog.events.EventTarget', 'goog.events.EventType', 'message', 'ssss']);
+goog.addDependency('../../../lockbox/app.js', ['app'], ['ga', 'goog.array', 'goog.crypt.base64', 'goog.debug.ErrorHandler', 'goog.dom', 'goog.events', 'goog.events.EventHandler', 'goog.events.EventTarget', 'goog.events.EventType', 'message', 'ssss']);
goog.addDependency('../../../lockbox/comb.js', ['comb'], ['goog.array']);
+goog.addDependency('../../../lockbox/ga.js', ['ga'], []);
goog.addDependency('../../../lockbox/gf28.js', ['gf28'], ['goog.array', 'goog.asserts']);
goog.addDependency('../../../lockbox/message.js', ['message'], ['goog.array', 'goog.asserts', 'goog.crypt.Sha1']);
goog.addDependency('../../../lockbox/rng.js', ['rng'], []);
View
2  externs.js
@@ -1,2 +1,2 @@
-var _gaq = {}; // Google Analytics tracker.
+var _gaq = []; // Google Analytics tracker.
var crypto = {};
View
16 ga.js
@@ -0,0 +1,16 @@
+goog.provide('ga');
+
+
+if (typeof _gaq == 'undefined') {
+ _gaq = [];
+}
+_gaq.push(['_setAccount', 'UA-28049294-1']);
+_gaq.push(['_setDomainName', 'github.com']);
+_gaq.push(['_setAllowLinker', true]);
+_gaq.push(['_trackPageview']);
+
+(function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
View
4 makefile
@@ -6,7 +6,7 @@ PREFIX=../../../lockbox
COMPILER_FLAGS=--compilation_level=ADVANCED_OPTIMIZATIONS --warning_level=VERBOSE --output_wrapper="(function(){%output%})()" --externs=$(EXTERNS)
# Don't touch these unless you're modifying the source.
-MODULES=app gf28 ssss comb message rng
+MODULES=ga app gf28 ssss comb message rng
EXTERNS=externs.js
# You should almost never have any reason to touch anything below this line. ###
@@ -34,7 +34,7 @@ alltests.js: *_test.html
deps.js: $(JS)
$(DEPSWRITER) --root_with_prefix='. $(PREFIX)' > $@
-app-compiled.js: ssss.js message.js
+app-compiled.js: ga.js ssss.js message.js
ssss-compiled.js: comb.js gf28.js rng.js
clean:

0 comments on commit 41bbfa7

Please sign in to comment.
Something went wrong with that request. Please try again.