Blame view

sources/3rdparty/css/strengthify/README.md 1.6 KB
6d9380f96   Cédric Dupont   Update sources OC...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
  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
  <div class="strengthify-wrapper"></div>
  ```
  
  Add `jquery` (tested with 1.10.0), `jquery.strengthify.js` and
  `strengthify.css` to your document.
  
  ```HTML
  <script src="jquery-1.10.0.min.js"></script>
  <script src="jquery-tipsy.js"></script>
  <script src="jquery.strengthify.js"></script>
  <link rel="stylesheet" href="strengthify.css" type="text/css">
  ```
  
  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
  --------
  
  <dl>
    <dt>0.3</dt>
    <dd>some fixes:
      <ul>
        <li>migrate from "display" to "opacity"</li>
        <li>fix pasting to input field</li>
        <li>add tipsy with strength</li>
      </ul>
    </dd>
    <dt>0.2</dt>
    <dd>solve mimetype issues</dd>
    <dt>0.1</dt>
    <dd>Initial version</dd>
  </dl>