<title>Skeleton Key</title>
<script type="text/javascript" src="pbkdf2.js"></script>
<script type="text/javascript" src="core.js"></script>
+ <script type="text/javascript" src="options.js"></script>
<link rel="stylesheet" href="common.css" />
<link rel="stylesheet" href="core.css" />
</head>
this._username = doc.getElementById('username');
this._password = doc.getElementById('password');
this._generateButton = doc.getElementById('generate');
+
+ this._options = new SkeletonKeyOptions();
+
this._init();
};
*/
SkeletonKey.prototype.KEYSIZE = 256/32;
-/**
- * The minimum length of a password.
- * @const {int}
- */
-SkeletonKey.prototype.MIN_LENGTH = 6;
-
/**
* Initializes event handlers for the page.
* @private
// it as the basis for capitalizing the key.
var capsSource = null;
var keyLength = key.length;
- if (keyLength / 2 <= this.MIN_LENGTH) {
- capsSouce = key.substr(0, keyLength - this.MIN_LENGTH);
+ if (keyLength / 2 <= this._options.getMinimumPasswordLength()) {
+ capsSouce = key.substr(0, keyLength - this._options.getMinimumPasswordLength());
} else {
capsSource = key.substr(keyLength / 2);
}
(function main() {
document.addEventListener('DOMContentLoaded', function() {
- var controller = new SkeletonKeyOptions(window);
+ var win = null;
+ if (window.location.pathname.indexOf('options.html') != -1)
+ win = window;
+ var controller = new SkeletonKeyOptions(win);
});
})();