From b3a886a6dbae200787d67c1676003f4b568ceb8e Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Thu, 23 Oct 2014 20:10:25 -0400 Subject: [PATCH] mpw-js: A javascript implementation of Master Password. --- .gitmodules | 3 + Site/2013-05/mpw-js/css/main.css | 110 + Site/2013-05/mpw-js/img/spinner.svg | 6 + Site/2013-05/mpw-js/index.html | 58 + Site/2013-05/mpw-js/js/dependencies.js | 47 + Site/2013-05/mpw-js/js/encoding-polyfill.js | 2408 +++++ Site/2013-05/mpw-js/js/main.js | 105 + Site/2013-05/mpw-js/js/mpw-js | 1 + Site/2013-05/mpw-js/js/promise-polyfill.js | 186 + Site/2013-05/mpw-js/js/typedarray-polyfill.js | 1030 ++ Site/2013-05/mpw-js/js/vendor/jquery-2.1.1.js | 9190 +++++++++++++++++ .../mpw-js/js/vendor/jquery-2.1.1.min.js | 4 + .../mpw-js/js/vendor/jquery-2.1.1.min.map | 1 + 13 files changed, 13149 insertions(+) create mode 100644 Site/2013-05/mpw-js/css/main.css create mode 100644 Site/2013-05/mpw-js/img/spinner.svg create mode 100644 Site/2013-05/mpw-js/index.html create mode 100644 Site/2013-05/mpw-js/js/dependencies.js create mode 100644 Site/2013-05/mpw-js/js/encoding-polyfill.js create mode 100644 Site/2013-05/mpw-js/js/main.js create mode 160000 Site/2013-05/mpw-js/js/mpw-js create mode 100644 Site/2013-05/mpw-js/js/promise-polyfill.js create mode 100644 Site/2013-05/mpw-js/js/typedarray-polyfill.js create mode 100644 Site/2013-05/mpw-js/js/vendor/jquery-2.1.1.js create mode 100644 Site/2013-05/mpw-js/js/vendor/jquery-2.1.1.min.js create mode 100644 Site/2013-05/mpw-js/js/vendor/jquery-2.1.1.min.map diff --git a/.gitmodules b/.gitmodules index fee07128..3a8463d8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,3 +19,6 @@ [submodule "External/jrswizzle"] path = External/jrswizzle url = git://github.com/jonmarimba/jrswizzle.git +[submodule "Site/2013-05/mpw-js/js/mpw-js"] + path = Site/2013-05/mpw-js/js/mpw-js + url = https://github.com/Lyndir/mpw-js.git diff --git a/Site/2013-05/mpw-js/css/main.css b/Site/2013-05/mpw-js/css/main.css new file mode 100644 index 00000000..85bed2c9 --- /dev/null +++ b/Site/2013-05/mpw-js/css/main.css @@ -0,0 +1,110 @@ +@import url(http://fonts.googleapis.com/css?family=Flamenco:300|Exo+2:400,100,900); + +/**** BASE STYLE ****/ +html { + background: radial-gradient(black 15%, transparent 16%) 0 0, + radial-gradient(black 15%, transparent 16%) 8px 8px, + radial-gradient(rgba(255,255,255,.05) 15%, transparent 20%) 0 1px, + radial-gradient(rgba(255,255,255,.05) 15%, transparent 20%) 8px 9px; + background-color: #161616; + background-size: 16px 16px; + + width: 100%; + height: 100%; + padding: 0; + margin: 0; +} +body { + background: radial-gradient(transparent 16%, black); + + width: 100%; + height: 100%; + padding: 0; + margin: 0; + overflow: hidden; + clear: both; + + font-family: 'Exo 2', + "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, + Arial, "Lucida Grande", sans-serif; + font-weight: 300; + color: #DDD; + text-align: center; +} +h1, h2, h3, h4 { + margin: 0; +} +h1 { + font-size: 5em; +} +a { + font: inherit; + color: inherit; +} +input, select { + background: rgba(0, 0, 0, .3); + border: 1px solid #000; + border-radius: 4px; + + width: 67%; + height: 2em; + margin: 1ex 0; + + font: inherit; + color: inherit; + text-align: center; +} +input:focus, select:focus { + outline: none; + box-shadow: 0 0 50px #333; +} +input.half, select.half { + width: 33%; +} +input[type="submit"], input[type="image"] { + background: transparent; + border: none; + + width: auto; + + font-size: 2em; +} +input[type="submit"] { + display: inline; +} +#identity.working input[type="submit"] { + display: none; +} +input[type="image"] { + display: none; +} +#identity.working input[type="image"] { + display: inline; +} +#error { + color: red; +} +header, section { + overflow: hidden; + clear: both; +} +header { + font-size: 0.8em; +} +section { + font-size: 2.5em; +} + + +/**** LAYOUT ****/ +section { + display: none; + + +} +section.active { + display: block; +} +.small { + font-size: 0.5em; +} diff --git a/Site/2013-05/mpw-js/img/spinner.svg b/Site/2013-05/mpw-js/img/spinner.svg new file mode 100644 index 00000000..a5f7a7b6 --- /dev/null +++ b/Site/2013-05/mpw-js/img/spinner.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Site/2013-05/mpw-js/index.html b/Site/2013-05/mpw-js/index.html new file mode 100644 index 00000000..4a3e3bec --- /dev/null +++ b/Site/2013-05/mpw-js/index.html @@ -0,0 +1,58 @@ + + + + + + Master Password — Secure your life, forget your passwords. + + + + + + +
+

Master Password by lhunath and tmthrgd

+ +
+
+

Identity

+

+
+
+
+ +

+
+ +
+

Site

+

+
+ + + +
+
+ + +

+
+ + + + + + + + + + diff --git a/Site/2013-05/mpw-js/js/dependencies.js b/Site/2013-05/mpw-js/js/dependencies.js new file mode 100644 index 00000000..0d54f51c --- /dev/null +++ b/Site/2013-05/mpw-js/js/dependencies.js @@ -0,0 +1,47 @@ +// If crypto.subtle is not supported, try crypto.webkitSubtle instead. +if (window.crypto && !window.crypto.subtle && window.crypto.webkitSubtle) + window.crypto.subtle = window.crypto.webkitSubtle; +if ((!window.crypto || !window.crypto.subtle) && window.SubtleCrypto) + window.crypto = { subtle: window.SubtleCrypto } + +// If Web Crypto API is not supported we include a JS crypto library +// https://code.google.com/p/crypto-js/ +if (!window.crypto || !window.crypto.subtle) { + document.write("