From 53c2dac367b7a08a7d59fc6376f5b900a98104fe Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 6 Nov 2014 14:15:18 +0100 Subject: [PATCH] drop strengthify - now in core via bower --- css/strengthify/LICENSE | 20 ---- css/strengthify/README.md | 82 ----------------- css/strengthify/strengthify.css | 48 ---------- js/strengthify/LICENSE | 20 ---- js/strengthify/README.md | 82 ----------------- js/strengthify/jquery.strengthify.js | 133 --------------------------- 6 files changed, 385 deletions(-) delete mode 100644 css/strengthify/LICENSE delete mode 100644 css/strengthify/README.md delete mode 100644 css/strengthify/strengthify.css delete mode 100644 js/strengthify/LICENSE delete mode 100644 js/strengthify/README.md delete mode 100644 js/strengthify/jquery.strengthify.js diff --git a/css/strengthify/LICENSE b/css/strengthify/LICENSE deleted file mode 100644 index 3c04738f..00000000 --- a/css/strengthify/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Morris Jobke - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/css/strengthify/README.md b/css/strengthify/README.md deleted file mode 100644 index d9e7ef58..00000000 --- a/css/strengthify/README.md +++ /dev/null @@ -1,82 +0,0 @@ -strengthify -=========== - -Combine jQuery and zxcvbn to create a password strength meter. - -How to use ----------- - -Add following wrapper to your document - preferably nearby the -password field. - -```HTML -
-``` - -Add `jquery` (tested with 1.10.0), `jquery.strengthify.js` and -`strengthify.css` to your document. - -```HTML - - - - -``` - -Because [zxcvbn](https://github.com/lowe/zxcvbn) is really -heavy-weigth it will be loaded asynchronous from `zxcvbn/zxcvbn.js`, -but this can be configured with an optional parameter. - -Then call `.strengthify` on the password input field. - -```JavaScript -$('#password-field').strengthify() -``` - -That's it. Now the password strength meter will be updated on -each keystroke. - -Configuration -------------- - -The path and the title of the different strength categories can -be configured with the first parameter of `.strengthify`. - -Default: - -```JSON -{ - "zxcvbn": "zxcvbn/zxcvbn.js", - "titles": [ - "Weakest", - "Weak", - "So-so", - "Good", - "Perfect" - ] -} -``` - -Overwrite example: - -```JavaScript -$('#password-field').strengthify({zxcvbn: 'my/path/to/zxcvbn.js'}) -``` - -Versions --------- - -
-
0.3
-
some fixes: -
    -
  • migrate from "display" to "opacity"
  • -
  • fix pasting to input field
  • -
  • add tipsy with strength
  • -
-
-
0.2
-
solve mimetype issues
-
0.1
-
Initial version
-
diff --git a/css/strengthify/strengthify.css b/css/strengthify/strengthify.css deleted file mode 100644 index 9340270e..00000000 --- a/css/strengthify/strengthify.css +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Strengthify - show the weakness of a password (uses zxcvbn for this) - * https://github.com/kabum/strengthify - * Version: 0.3 - * License: The MIT License (MIT) - * Copyright (c) 2013 Morris Jobke - */ - -.strengthify-wrapper > * { - -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - opacity: 0; - -webkit-transition:all .5s ease-in-out; - -moz-transition:all .5s ease-in-out; - transition:all .5s ease-in-out; -} - -.strengthify-bg, .strengthify-container, .strengthify-wrapper, .strengthify-separator { - height: 3px; -} - -.strengthify-bg, .strengthify-container { - display: block; - position: absolute; - width: 100%; -} - -.strengthify-bg { - background-color: #BBB; -} - -.strengthify-separator { - display: inline-block; - position: absolute; - background-color: #FFF; - width: 1px; - z-index: 10; -} - -.password-bad { - background-color: #C33; -} -.password-medium { - background-color: #F80; -} -.password-good { - background-color: #3C3; -} \ No newline at end of file diff --git a/js/strengthify/LICENSE b/js/strengthify/LICENSE deleted file mode 100644 index 3c04738f..00000000 --- a/js/strengthify/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Morris Jobke - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/js/strengthify/README.md b/js/strengthify/README.md deleted file mode 100644 index d9e7ef58..00000000 --- a/js/strengthify/README.md +++ /dev/null @@ -1,82 +0,0 @@ -strengthify -=========== - -Combine jQuery and zxcvbn to create a password strength meter. - -How to use ----------- - -Add following wrapper to your document - preferably nearby the -password field. - -```HTML -
-``` - -Add `jquery` (tested with 1.10.0), `jquery.strengthify.js` and -`strengthify.css` to your document. - -```HTML - - - - -``` - -Because [zxcvbn](https://github.com/lowe/zxcvbn) is really -heavy-weigth it will be loaded asynchronous from `zxcvbn/zxcvbn.js`, -but this can be configured with an optional parameter. - -Then call `.strengthify` on the password input field. - -```JavaScript -$('#password-field').strengthify() -``` - -That's it. Now the password strength meter will be updated on -each keystroke. - -Configuration -------------- - -The path and the title of the different strength categories can -be configured with the first parameter of `.strengthify`. - -Default: - -```JSON -{ - "zxcvbn": "zxcvbn/zxcvbn.js", - "titles": [ - "Weakest", - "Weak", - "So-so", - "Good", - "Perfect" - ] -} -``` - -Overwrite example: - -```JavaScript -$('#password-field').strengthify({zxcvbn: 'my/path/to/zxcvbn.js'}) -``` - -Versions --------- - -
-
0.3
-
some fixes: -
    -
  • migrate from "display" to "opacity"
  • -
  • fix pasting to input field
  • -
  • add tipsy with strength
  • -
-
-
0.2
-
solve mimetype issues
-
0.1
-
Initial version
-
diff --git a/js/strengthify/jquery.strengthify.js b/js/strengthify/jquery.strengthify.js deleted file mode 100644 index 8b62f6b2..00000000 --- a/js/strengthify/jquery.strengthify.js +++ /dev/null @@ -1,133 +0,0 @@ -/** - * Strengthify - show the weakness of a password (uses zxcvbn for this) - * https://github.com/kabum/strengthify - * - * Version: 0.3 - * Author: Morris Jobke (github.com/kabum) - * - * License: - * - * The MIT License (MIT) - * - * Copyright (c) 2013 Morris Jobke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -(function ($) { - $.fn.strengthify = function(options) { - var me = this - - var defaults = { - zxcvbn: 'zxcvbn/zxcvbn.js', - titles: [ - 'Weakest', - 'Weak', - 'So-so', - 'Good', - 'Perfect' - ] - } - - var options = $.extend(defaults, options) - - // add elements - $('.strengthify-wrapper') - .append('
') - .append('
') - .append('
') - .append('
') - .append('
') - - var oldDisplayState = $('.strengthify-wrapper').css('display') - - $.ajax({ - cache: true, - dataType: 'script', - url: options.zxcvbn - }).done(function() { - me.bind('keyup input', function() { - var password = $(this).val() - - // hide strengthigy if no input is provided - var opacity = (password === '') ? 0 : 1 - $('.strengthify-wrapper').children().css( - 'opacity', - opacity - ).css( - '-ms-filter', - '"progid:DXImageTransform.Microsoft.Alpha(Opacity=' + opacity * 100 + ')"' - ) - - // calculate result - var result = zxcvbn(password) - - var css = '' - // style strengthify bar - // possible scores: 0-4 - switch(result.score) { - case 0: - case 1: - css = 'password-bad'; - break; - case 2: - css = 'password-medium'; - break; - case 3: - case 4: - css = 'password-good'; - break; - } - - $('.strengthify-container').attr('class', css + ' strengthify-container') - // possible scores: 0-4 - $('.strengthify-container').css( - 'width', - // if score is '0' it will be changed to '1' to - // not hide strengthify if the password is extremely weak - ((result.score == 0 ? 1 : result.score) * 25) + '%' - ) - // set a title for the wrapper - $('.strengthify-wrapper').attr( - 'title', - options.titles[result.score] - ).tipsy({ - trigger: 'manual', - opacity: opacity - }).tipsy( - 'show' - ) - - if(opacity === 0) { - $('.strengthify-wrapper').tipsy( - 'hide' - ) - } - - // reset state for empty string password - if(password === '') { - $('.strengthify-container').css('width', 0) - } - - }) - }) - - return me - }; - -}(jQuery)) \ No newline at end of file