├── CHANGELOG.md
├── LICENSE
├── README.md
├── browserconfig.xml
├── css
├── normalize.css
├── normalize.min.css
└── password-om.css
├── favicon.ico
├── favicon.png
├── favicon
├── android-chrome-192x192.png
├── android-chrome-256x256.png
├── apple-touch-icon.png
├── browserconfig.xml
├── favicon-16x16.png
├── favicon-32x32.png
├── favicon.ico
├── mstile-150x150.png
├── pomjs-logo.png
├── safari-pinned-tab.svg
└── site.webmanifest
├── favicon_32.png
├── index.html
├── js
├── password-om.js
└── password-om.min.js
├── robots.txt
└── site.webmanifest
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog for POMjs
2 | All notable changes to this project will be documented in this file.
3 |
4 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5 |
6 | ## [1.1.4] - 2023-07-25
7 |
8 | ### Added
9 | - Added Slovenian (sl) translation (#6); thank you Gregor Godler
10 | - Added missing Hungarian (hu) translation (#5) in meta description
11 |
12 | ### Changed
13 | - Some minor typeface (font) changes to play better with iOS/macOS browsers
14 | - Some minor UI changes to make password strength indicator more clear
15 |
16 | ## [1.1.3] - 2023-06-05
17 |
18 | ### Added
19 | - Added Hungarian (hu) translation (#5); thank you Mihaly Balassy
20 |
21 | ## [1.1.2] - 2023-02-21
22 |
23 | ### Added
24 | - Added Luxembourgish (lb) translation (#2); thank you Alain Fontaine
25 | - Added French (fr) translation (#3); thank you Alain Fontaine
26 | - Added Finnish (fi) translation (PR#3); thank you Thomas Raehalme
27 |
28 | ## [1.1.1] - 2023-01-23
29 |
30 | ### Added
31 | - Added Dutch translation (#1); thank you Jeroen van de Leur
32 |
33 | ## [1.1.0] - 2022-10-24
34 |
35 | ### Changed
36 | - Moved loading of the javascript file to `
` with `defer` attribute to be more adherent to standards.
37 |
38 | ### Added
39 | - Added `CHANGELOG.md` :blush:
40 | - Added links to "demo" sites using POMjs
41 | - Added `autofocus` attribute to password generation `button`, this allows Space> and Enter keys to be used to immediately generate passwords.
42 | - Added HTML "outline" to the password generation button when it has focus to make it more obvious that is has focus
43 | - Added automatic password generation (configurable) when parameters are changed, default is enabled.
44 |
45 | ### Removed
46 | - Removed incorrect debug output (it would be logged even if debugging was disabled)
47 |
48 | ## [1.0.0] - 2022-10-21
49 | - Initial release
50 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Lesser General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
281 |
282 | How to Apply These Terms to Your New Programs
283 |
284 | If you develop a new program, and you want it to be of the greatest
285 | possible use to the public, the best way to achieve this is to make it
286 | free software which everyone can redistribute and change under these terms.
287 |
288 | To do so, attach the following notices to the program. It is safest
289 | to attach them to the start of each source file to most effectively
290 | convey the exclusion of warranty; and each file should have at least
291 | the "copyright" line and a pointer to where the full notice is found.
292 |
293 |
294 | Copyright (C)
295 |
296 | This program is free software; you can redistribute it and/or modify
297 | it under the terms of the GNU General Public License as published by
298 | the Free Software Foundation; either version 2 of the License, or
299 | (at your option) any later version.
300 |
301 | This program is distributed in the hope that it will be useful,
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 | GNU General Public License for more details.
305 |
306 | You should have received a copy of the GNU General Public License along
307 | with this program; if not, write to the Free Software Foundation, Inc.,
308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309 |
310 | Also add information on how to contact you by electronic and paper mail.
311 |
312 | If the program is interactive, make it output a short notice like this
313 | when it starts in an interactive mode:
314 |
315 | Gnomovision version 69, Copyright (C) year name of author
316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 | This is free software, and you are welcome to redistribute it
318 | under certain conditions; type `show c' for details.
319 |
320 | The hypothetical commands `show w' and `show c' should show the appropriate
321 | parts of the General Public License. Of course, the commands you use may
322 | be called something other than `show w' and `show c'; they could even be
323 | mouse-clicks or menu items--whatever suits your program.
324 |
325 | You should also get your employer (if you work as a programmer) or your
326 | school, if any, to sign a "copyright disclaimer" for the program, if
327 | necessary. Here is a sample; alter the names:
328 |
329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
331 |
332 | , 1 April 1989
333 | Ty Coon, President of Vice
334 |
335 | This General Public License does not permit incorporating your program into
336 | proprietary programs. If your program is a subroutine library, you may
337 | consider it more useful to permit linking proprietary applications with the
338 | library. If this is what you want to do, use the GNU Lesser General
339 | Public License instead of this License.
340 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](LICENSE)
2 | [](https://en.wikipedia.org/wiki/JavaScript)
3 |
4 | # POMjs
5 |
6 | **POMjs** is a random password generator in HTML and pure Javascript. It can be customized by modifying the sources. There's really nothing magic going on here, but it works and is somewhat responsive. The goal was to make something small, useful, and reasonably free from dependencies.
7 |
8 | ## Parts
9 |
10 | **POMjs** uses a "minified" version of [normalize.css](https://necolas.github.io/normalize.css) to reset the DOM to reasonable settings :blush:
11 |
12 | **POMjs** includes no externally loaded resources and contains no tracking code or cookie management.
13 |
14 | ## Installation
15 |
16 | Download the distribution or clone the repo. Files and folders should be placed in your web root, or another folder accessible to your web server. All references to `CSS` and `Javascript` use relative paths.
17 |
18 | There may be references to "Öppet Moln" ("Open Cloud"), which is a Swedish site run by the author of **POMjs**, [oppetmoln.se](https://oppetmoln.se), to promote open source solutions for general use. You can, of course, delete such references.
19 |
20 | I'd appreciate a mention on whatever website you use this one, and a link to the original repo, but it's not required.
21 |
22 | ## Usage
23 |
24 | * From a visitor perspective, simply enable the desired string sequences, and possibly adjust the password length. Click on the Enter button or use the Enter key when the button has focus.
25 | * The generated password is displayed at the bottom of the box, along with a strength indicator.
26 | * The slider can also be used to change the number of characters in the generated password, as can the input field to the right of the slider.
27 | * The HTML should have proper `tabindex` attributes for easier keyboard navigation.
28 | * To copy the generated password to the clipboard, click on the password.
29 | * "Dark mode" (browser setting) should be honored.
30 |
31 | ## Changes
32 |
33 | Please see [CHANGELOG.md](CHANGELOG.md) for a list of changes.
34 |
35 | ## Customization
36 |
37 | The original Javascript source is in `password-om.js`. The `index.html` file includes `password-om.min.js`. So I suggest you make your customizations in the "unminified" .js file and then create a new `password-om.min.js` file. If you do not have access to a "minification tool", you can simply copy an "unminified" version of `password-om.js` to `password-om.min.js`, it's really not that big of a difference.
38 |
39 | Most parameters/settings can be changed in the `.js` file.
40 |
41 | ### Variables (in .js file)
42 |
43 | | Name | Default | Comment |
44 | | ------------------------- | -------------------- | ------------------------------------------ |
45 | | POM_strUppercase | Auto-generated A-Z | Change if needed, used by default |
46 | | POM_strLowercase | Auto-generated a-z | Change if needed, used by default |
47 | | POM_strDigits | Auto-generated 0-9 | Change if needed, used by default |
48 | | POM_strSpecialOne | -.\_#$@%! | Change if needed, used by default |
49 | | POM_strSpecialTwo | "+(){}[]?&,\*<>\|:;^ | Change if needed, **not** used by default |
50 | | POM_strUppercase_Default | true | Enables POM_strUppercase by default |
51 | | POM_strLowercase_Default | true | Enables POM_strLowercase by default |
52 | | POM_strDigits_Default | true | Enables POM_strDigits by default |
53 | | POM_strSpecialOne_Default | true | Enables POM_strSpecialOne by default |
54 | | POM_strSpecialTwo_Default | **false** | Enables POM_strSpecialTwo by default |
55 | | POM_mkPasswordOnLoad | true | Generate password on first page load |
56 | | POM_changeIsClick | true | Generate password when parameters are changed |
57 | | POM_minLength | 16 | Minimum (and default) password length |
58 | | POM_maxLength | 256 | Maxmium password length |
59 | | POM_sliderStep | 8 | 1 - .. |
60 | | POM_debug | false | Emit "debug" output with console.log() |
61 |
62 | ### CSS
63 |
64 | Most of the styling is done via CSS. I have tried to make it reasonably responsive, and I have tested with it with various browsers.
65 |
66 | Please note that `index.html` makes use of `password-om.min.css` by default.
67 |
68 | ### Translation
69 |
70 | The (very) few strings can be translated. The distribution contains strings in English (default), Swedish, German, Dutch, Finnish, French, and Luxembourgish. The code attempts to guess the language from the **navigator.language** properties. If they do not exist, or cannot be interpreted, the fallback language used is English.
71 |
72 | The "string setup" is done in the `POM_initialSetup()` function.
73 |
74 | If you would like to contribute to the translation, please open an issue and post the language and the translated strings, please include how/if you would like to be mentioned in the credits.
75 |
76 | ## Credits
77 |
78 | Thanks to **Peter Hampf** (hello `O/T-Track` :metal:) for the German translation :blush:
79 | Thanks to **Jeroen van de Leur** for the Dutch translation :blush:
80 | Thanks to **Alain Fontaine** for the French and Luxembourgish translations :blush:
81 | Thanks to **Thomas Raehalme** for the Finnish translations :blush:
82 | Thanks to **Mihaly Balassy** for the Hungarian translations :blush:
83 | Thanks to **Gregor Godler** for the Slovenian translations :blush:
84 | Thanks for **Sarah Bailey** for assistance in "debugging" use on iOS/macOS :blush:
85 |
86 | The "cloud icon" comes from [Streamline](https://streamlinehq.com)
87 |
88 | **POMjs** was written by Joaquim Homrighausen while converting caffeine into code :coffee:
89 |
90 | ## License
91 |
92 | **POMjs** is licensed under the GPLv2 license. See the [`LICENSE`](LICENSE) file for more details.
93 |
94 | Copyright 2022, 2023 Joaquim Homrighausen.
95 |
96 | ### Demo
97 |
98 | You can see POMjs in action, and more or less unmodified, on the following links:
99 |
100 | * Öppet Moln ("Open Cloud"); [password.oppetmoln.se](https://password.oppetmoln.se)
101 | * WebbPlatsen i Sverige AB; [password.webbplatsen.se](https://password.webbplatsen.se)
102 |
103 | ### External references
104 |
105 | These links are not here for any sort of endorsement or marketing, they're purely for informational purposes :sunglasses:
106 |
107 | * WebbPlatsen; [webbplatsen.se](https://webbplatsen.se)
108 | * Öppet Moln ("Open Cloud"); [oppetmoln.se](https://oppetmoln.se)
109 | * me; [joho.se](https://joho.se) and [github.com/joho1968](https://github.com/joho1968)
110 | * POMjs repo; [github.com/joho1968/POMjs](https://github.com/joho1968/POMjs)
111 | * normalize.css repo; [github.com/necolas/normalize.css](https://github.com/necolas/normalize.css)
112 | * Streamline, Icons and Illustrations; [streamlinehq.com](https://streamlinehq.com)
113 |
--------------------------------------------------------------------------------
/browserconfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | #2b5797
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/css/normalize.css:
--------------------------------------------------------------------------------
1 | /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
2 |
3 | /* Document
4 | ========================================================================== */
5 |
6 | /**
7 | * 1. Correct the line height in all browsers.
8 | * 2. Prevent adjustments of font size after orientation changes in iOS.
9 | */
10 |
11 | html {
12 | line-height: 1.15; /* 1 */
13 | -webkit-text-size-adjust: 100%; /* 2 */
14 | }
15 |
16 | /* Sections
17 | ========================================================================== */
18 |
19 | /**
20 | * Remove the margin in all browsers.
21 | */
22 |
23 | body {
24 | margin: 0;
25 | }
26 |
27 | /**
28 | * Render the `main` element consistently in IE.
29 | */
30 |
31 | main {
32 | display: block;
33 | }
34 |
35 | /**
36 | * Correct the font size and margin on `h1` elements within `section` and
37 | * `article` contexts in Chrome, Firefox, and Safari.
38 | */
39 |
40 | h1 {
41 | font-size: 2em;
42 | margin: 0.67em 0;
43 | }
44 |
45 | /* Grouping content
46 | ========================================================================== */
47 |
48 | /**
49 | * 1. Add the correct box sizing in Firefox.
50 | * 2. Show the overflow in Edge and IE.
51 | */
52 |
53 | hr {
54 | box-sizing: content-box; /* 1 */
55 | height: 0; /* 1 */
56 | overflow: visible; /* 2 */
57 | }
58 |
59 | /**
60 | * 1. Correct the inheritance and scaling of font size in all browsers.
61 | * 2. Correct the odd `em` font sizing in all browsers.
62 | */
63 |
64 | pre {
65 | font-family: monospace, monospace; /* 1 */
66 | font-size: 1em; /* 2 */
67 | }
68 |
69 | /* Text-level semantics
70 | ========================================================================== */
71 |
72 | /**
73 | * Remove the gray background on active links in IE 10.
74 | */
75 |
76 | a {
77 | background-color: transparent;
78 | }
79 |
80 | /**
81 | * 1. Remove the bottom border in Chrome 57-
82 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
83 | */
84 |
85 | abbr[title] {
86 | border-bottom: none; /* 1 */
87 | text-decoration: underline; /* 2 */
88 | text-decoration: underline dotted; /* 2 */
89 | }
90 |
91 | /**
92 | * Add the correct font weight in Chrome, Edge, and Safari.
93 | */
94 |
95 | b,
96 | strong {
97 | font-weight: bolder;
98 | }
99 |
100 | /**
101 | * 1. Correct the inheritance and scaling of font size in all browsers.
102 | * 2. Correct the odd `em` font sizing in all browsers.
103 | */
104 |
105 | code,
106 | kbd,
107 | samp {
108 | font-family: monospace, monospace; /* 1 */
109 | font-size: 1em; /* 2 */
110 | }
111 |
112 | /**
113 | * Add the correct font size in all browsers.
114 | */
115 |
116 | small {
117 | font-size: 80%;
118 | }
119 |
120 | /**
121 | * Prevent `sub` and `sup` elements from affecting the line height in
122 | * all browsers.
123 | */
124 |
125 | sub,
126 | sup {
127 | font-size: 75%;
128 | line-height: 0;
129 | position: relative;
130 | vertical-align: baseline;
131 | }
132 |
133 | sub {
134 | bottom: -0.25em;
135 | }
136 |
137 | sup {
138 | top: -0.5em;
139 | }
140 |
141 | /* Embedded content
142 | ========================================================================== */
143 |
144 | /**
145 | * Remove the border on images inside links in IE 10.
146 | */
147 |
148 | img {
149 | border-style: none;
150 | }
151 |
152 | /* Forms
153 | ========================================================================== */
154 |
155 | /**
156 | * 1. Change the font styles in all browsers.
157 | * 2. Remove the margin in Firefox and Safari.
158 | */
159 |
160 | button,
161 | input,
162 | optgroup,
163 | select,
164 | textarea {
165 | font-family: inherit; /* 1 */
166 | font-size: 100%; /* 1 */
167 | line-height: 1.15; /* 1 */
168 | margin: 0; /* 2 */
169 | }
170 |
171 | /**
172 | * Show the overflow in IE.
173 | * 1. Show the overflow in Edge.
174 | */
175 |
176 | button,
177 | input { /* 1 */
178 | overflow: visible;
179 | }
180 |
181 | /**
182 | * Remove the inheritance of text transform in Edge, Firefox, and IE.
183 | * 1. Remove the inheritance of text transform in Firefox.
184 | */
185 |
186 | button,
187 | select { /* 1 */
188 | text-transform: none;
189 | }
190 |
191 | /**
192 | * Correct the inability to style clickable types in iOS and Safari.
193 | */
194 |
195 | button,
196 | [type="button"],
197 | [type="reset"],
198 | [type="submit"] {
199 | -webkit-appearance: button;
200 | }
201 |
202 | /**
203 | * Remove the inner border and padding in Firefox.
204 | */
205 |
206 | button::-moz-focus-inner,
207 | [type="button"]::-moz-focus-inner,
208 | [type="reset"]::-moz-focus-inner,
209 | [type="submit"]::-moz-focus-inner {
210 | border-style: none;
211 | padding: 0;
212 | }
213 |
214 | /**
215 | * Restore the focus styles unset by the previous rule.
216 | */
217 |
218 | button:-moz-focusring,
219 | [type="button"]:-moz-focusring,
220 | [type="reset"]:-moz-focusring,
221 | [type="submit"]:-moz-focusring {
222 | outline: 1px dotted ButtonText;
223 | }
224 |
225 | /**
226 | * Correct the padding in Firefox.
227 | */
228 |
229 | fieldset {
230 | padding: 0.35em 0.75em 0.625em;
231 | }
232 |
233 | /**
234 | * 1. Correct the text wrapping in Edge and IE.
235 | * 2. Correct the color inheritance from `fieldset` elements in IE.
236 | * 3. Remove the padding so developers are not caught out when they zero out
237 | * `fieldset` elements in all browsers.
238 | */
239 |
240 | legend {
241 | box-sizing: border-box; /* 1 */
242 | color: inherit; /* 2 */
243 | display: table; /* 1 */
244 | max-width: 100%; /* 1 */
245 | padding: 0; /* 3 */
246 | white-space: normal; /* 1 */
247 | }
248 |
249 | /**
250 | * Add the correct vertical alignment in Chrome, Firefox, and Opera.
251 | */
252 |
253 | progress {
254 | vertical-align: baseline;
255 | }
256 |
257 | /**
258 | * Remove the default vertical scrollbar in IE 10+.
259 | */
260 |
261 | textarea {
262 | overflow: auto;
263 | }
264 |
265 | /**
266 | * 1. Add the correct box sizing in IE 10.
267 | * 2. Remove the padding in IE 10.
268 | */
269 |
270 | [type="checkbox"],
271 | [type="radio"] {
272 | box-sizing: border-box; /* 1 */
273 | padding: 0; /* 2 */
274 | }
275 |
276 | /**
277 | * Correct the cursor style of increment and decrement buttons in Chrome.
278 | */
279 |
280 | [type="number"]::-webkit-inner-spin-button,
281 | [type="number"]::-webkit-outer-spin-button {
282 | height: auto;
283 | }
284 |
285 | /**
286 | * 1. Correct the odd appearance in Chrome and Safari.
287 | * 2. Correct the outline style in Safari.
288 | */
289 |
290 | [type="search"] {
291 | -webkit-appearance: textfield; /* 1 */
292 | outline-offset: -2px; /* 2 */
293 | }
294 |
295 | /**
296 | * Remove the inner padding in Chrome and Safari on macOS.
297 | */
298 |
299 | [type="search"]::-webkit-search-decoration {
300 | -webkit-appearance: none;
301 | }
302 |
303 | /**
304 | * 1. Correct the inability to style clickable types in iOS and Safari.
305 | * 2. Change font properties to `inherit` in Safari.
306 | */
307 |
308 | ::-webkit-file-upload-button {
309 | -webkit-appearance: button; /* 1 */
310 | font: inherit; /* 2 */
311 | }
312 |
313 | /* Interactive
314 | ========================================================================== */
315 |
316 | /*
317 | * Add the correct display in Edge, IE 10+, and Firefox.
318 | */
319 |
320 | details {
321 | display: block;
322 | }
323 |
324 | /*
325 | * Add the correct display in all browsers.
326 | */
327 |
328 | summary {
329 | display: list-item;
330 | }
331 |
332 | /* Misc
333 | ========================================================================== */
334 |
335 | /**
336 | * Add the correct display in IE 10+.
337 | */
338 |
339 | template {
340 | display: none;
341 | }
342 |
343 | /**
344 | * Add the correct display in IE 10.
345 | */
346 |
347 | [hidden] {
348 | display: none;
349 | }
350 |
--------------------------------------------------------------------------------
/css/normalize.min.css:
--------------------------------------------------------------------------------
1 | /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */button,hr,input{overflow:visible}progress,sub,sup{vertical-align:baseline}[type=checkbox],[type=radio],legend{box-sizing:border-box;padding:0}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}details,main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:ButtonText dotted 1px}fieldset{padding:.35em .75em .625em}legend{color:inherit;display:table;max-width:100%;white-space:normal}textarea{overflow:auto}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}[hidden],template{display:none}
--------------------------------------------------------------------------------
/css/password-om.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --pom-bg-color-normal:#ffffff;
3 | --pom-fg-color-normal:#000000;
4 | --pom-h-color:#404040;
5 | --pom-a-color:#008000;
6 | --pom-a-hover-color:#006000;
7 | --pom-gen-bg:#cccccc;
8 | --pom-gen-border:#bbbbbb;
9 | --pom-gen-shadow:#aaaaaa;
10 | --pom-gen-opacity:1;
11 | --pom-mk-password-field-border:#bbbbbb;
12 | --pom-mk-password-field-focus:green;
13 | --pom-mk-password-field-focus-text:#ffffff;
14 | --pom-mk-password-len-slider:#e3e3e3;
15 | --pom-mk-password-len-slider-opacity:0.7;
16 | --pom-mk-password-len-slider-thumb:#00008B;
17 | --pom-mk-password-btn:#000000;
18 | --pom-mk-password-btn-text:#ffffff;
19 | --pom-mk-password-btn-ol:#00008B;
20 | }
21 | @media screen and (prefers-color-scheme: dark) {
22 | :root {
23 | --pom-bg-color-normal:#000000;
24 | --pom-fg-color-normal:#ffffff;
25 | --pom-h-color:#00e000;
26 | --pom-a-color:#00dddd;
27 | --pom-a-hover-color:#00ffff;
28 | --pom-gen-bg:#383838;
29 | --pom-gen-border:#686868;
30 | --pom-gen-shadow:#cccccc;
31 | --pom-gen-opacity:0.9;
32 | --pom-mk-password-field-border:#eeeeee;
33 | --pom-mk-password-field-focus:#00FF33;
34 | --pom-mk-password-field-focus-text:#000000;
35 | --pom-mk-password-len-slider:#0000ff;
36 | --pom-mk-password-len-slider-opacity:0.9;
37 | --pom-mk-password-len-slider-thumb:#f0f0f0;
38 | --pom-mk-password-btn:#eeeeee;
39 | --pom-mk-password-btn-text:#000000;
40 | --pom-mk-password-btn-ol:orange;
41 | }
42 | }
43 |
44 | html {
45 | background-color:var(--pom-bg-color-normal);
46 | color:var(--pom-fg-color-normal);
47 | }
48 |
49 | html * {
50 | font-family: "SF Mono", SFMono-Regular, ui-monospace, "Lucida Sans Typewriter", "Lucida Console", "Bitstream Vera Sans Mono", monospace;
51 | }
52 |
53 | body {
54 | padding:0px;
55 | margin:0px;
56 | }
57 |
58 | h1, h2 {
59 | color:var(--pom-h-color);
60 | }
61 | header {
62 | margin-top:30px;
63 | text-align:center;
64 | }
65 | footer {
66 | margin-top:30px;
67 | padding:5px;
68 | text-align:center;
69 | }
70 | a, a:visited {
71 | text-decoration:none;
72 | color:var(--pom-a-color);
73 | }
74 | a:hover {
75 | color:var(--pom-a-hover-color);
76 | text-decoration:underline;
77 | }
78 | #cfg-page-title {
79 | font-size:1.8rem;
80 | }
81 | #cfg-page-slogan {
82 | font-size:1.6rem;
83 | }
84 | #cfg-page-lang {
85 | font-size:0.8rem;
86 | color:#aaaaaa;
87 | }
88 | #gen-hosted-by {
89 | font-size:0.9rem !important;
90 | }
91 | #gen-timestamp {
92 | font-size:0.8rem !important;
93 | color:#eee;
94 | display:none;
95 | }
96 | #generator {
97 | padding:40px;
98 | margin:0 auto !important;
99 | width:50vw;
100 | max-width:450px;
101 | min-width:350px !important;
102 | border-radius:20px;
103 | background-color:var(--pom-gen-bg);
104 | border:2px solid var(--pom-gen-border);
105 | box-shadow:0 0 5px var(--pom-gen-shadow);
106 | opacity:var(--pom-gen-opacity);
107 | }
108 | #mk-password-div {
109 | margin:0 auto !important;
110 | }
111 | #mk-password-field {
112 | width:98% !important;
113 | border:2px solid var(--pom-mk-password-field-border) !important;
114 | border-radius:5px !important;
115 | }
116 | .mk-password-field-focus {
117 | outline:none !important;
118 | border:2px solid var(--pom-mk-password-field-focus) !important;
119 | background-color:var(--pom-mk-password-field-focus) !important;
120 | color:var(--pom-mk-password-field-focus-text) !important;
121 | transition:0.5s;
122 | }
123 | #mk-password-field:hover {
124 | cursor:pointer !important;
125 | }
126 | #mk-password-good {
127 | width:98% !important;
128 | height:1.1rem !important;
129 | margin-top:10px !important;
130 | border:2px solid var(--pom-mk-password-field-border) !important;
131 | }
132 | #mk-password-len-slider {
133 | -webkit-appearance:none;
134 | outline: none;
135 | width:85%;
136 | max-width:410px !important;
137 | height: 12px;
138 | border-radius: 5px;
139 | opacity:var(--pom-mk-password-len-slider-opacity);
140 | -webkit-transition:.2s;
141 | transition:opacity .2s;
142 | background:var(--pom-mk-password-len-slider);
143 | }
144 | #mk-password-len-slider::-webkit-slider-thumb {
145 | -webkit-appearance: none;
146 | appearance: none;
147 | cursor:pointer;
148 | width:22px;
149 | height:22px;
150 | border-radius:50%;
151 | background:var(--pom-mk-password-len-slider-thumb);
152 | }
153 | #mk-password-len-slider::-moz-range-thumb {
154 | cursor:pointer;
155 | width:22px;
156 | height:22px;
157 | border-radius:50%;
158 | background:var(--pom-mk-password-len-slider-thumb);
159 | }
160 | #mk-length-field {
161 | font-size:0.9rem !important;
162 | width:32px !important;
163 | border:1px solid #cccccc !important;
164 | border-radius:5px !important;
165 | }
166 | #mk-length-field:hover {
167 | cursor:pointer !important;
168 | }
169 | #mk-length-field:active {
170 | cursor:text !important;
171 | }
172 | #mk-length-field:focus {
173 | cursor:text !important;
174 | }
175 |
176 | #mk-password-btn-div {
177 | text-align:right;
178 | margin-bottom:10px;
179 | line-height:1.4rem !important;
180 | }
181 | #mk-password-btn {
182 | padding-top:3px !important;
183 | width:70px !important;
184 | font-size:1.4rem !important;
185 | line-height:1.4rem !important;
186 | font-weight:bold;
187 | max-height:32px !important;
188 | border:1px solid #cccccc !important;
189 | border-radius:5px !important;
190 | color:var(--pom-mk-password-btn-text);
191 | background-color:var(--pom-mk-password-btn);
192 | }
193 | #mk-password-btn:focus {
194 | outline:2px dotted var(--pom-mk-password-btn-ol) !important;
195 | outline-offset:2px;
196 | }
197 | #mk-password-btn:hover {
198 | cursor:pointer !important;
199 | }
200 | #mk-password-btn:before {
201 | content: "";
202 | display:inline-block;
203 | height:1.6rem;
204 | vertical-align:middle;
205 | }
206 | .selection-row {
207 | font-size:1.1rem !important;
208 | width:100%;
209 | margin-bottom:10px;
210 | display:grid;
211 | grid-template-columns: 310px 40px;
212 | justify-content:space-between;
213 | }
214 | .selection-col {
215 | text-align:right;
216 | justify-self:end;
217 | width:70px !important;
218 | }
219 | .check-option {
220 | width:28px;
221 | height:20px;
222 | position:relative;
223 | display:inline-block;
224 | margin-left:auto;
225 | padding:0 !important;
226 | }
227 | .check-option input {
228 | width:0;
229 | height:0;
230 | opacity:0;
231 | }
232 | /* Let's be nice to smaller screens */
233 | @media only screen and (max-width: 450px) {
234 | footer {
235 | margin-top:20px;
236 | font-size:0.8rem !important;
237 | }
238 | #gen-hosted-by {
239 | font-size:0.8rem !important;
240 | }
241 | #generator {
242 | padding:20px !important;
243 | margin:0 auto !important;
244 | width:100% !important;
245 | border-radius:0px !important;
246 | box-shadow:none !important;
247 | max-width:320px !important;
248 | min-width:300px !important;
249 | }
250 | .static-col {
251 | font-size:0.9rem !important;
252 | }
253 | #cfg-page-title {
254 | font-size:1.4rem !important;
255 | }
256 | #cfg-page-slogan {
257 | font-size:1.2rem !important;
258 | }
259 | .selection-row {
260 | grid-template-columns: 280px 40px !important;
261 | }
262 | }
263 | /* end of file "password-om.css" */
264 |
--------------------------------------------------------------------------------
/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joho1968/POMjs/6b77bdbf10279b6ad916e534e90e102fcce04014/favicon.ico
--------------------------------------------------------------------------------
/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joho1968/POMjs/6b77bdbf10279b6ad916e534e90e102fcce04014/favicon.png
--------------------------------------------------------------------------------
/favicon/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joho1968/POMjs/6b77bdbf10279b6ad916e534e90e102fcce04014/favicon/android-chrome-192x192.png
--------------------------------------------------------------------------------
/favicon/android-chrome-256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joho1968/POMjs/6b77bdbf10279b6ad916e534e90e102fcce04014/favicon/android-chrome-256x256.png
--------------------------------------------------------------------------------
/favicon/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joho1968/POMjs/6b77bdbf10279b6ad916e534e90e102fcce04014/favicon/apple-touch-icon.png
--------------------------------------------------------------------------------
/favicon/browserconfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | #2b5797
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/favicon/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joho1968/POMjs/6b77bdbf10279b6ad916e534e90e102fcce04014/favicon/favicon-16x16.png
--------------------------------------------------------------------------------
/favicon/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joho1968/POMjs/6b77bdbf10279b6ad916e534e90e102fcce04014/favicon/favicon-32x32.png
--------------------------------------------------------------------------------
/favicon/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joho1968/POMjs/6b77bdbf10279b6ad916e534e90e102fcce04014/favicon/favicon.ico
--------------------------------------------------------------------------------
/favicon/mstile-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joho1968/POMjs/6b77bdbf10279b6ad916e534e90e102fcce04014/favicon/mstile-150x150.png
--------------------------------------------------------------------------------
/favicon/pomjs-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joho1968/POMjs/6b77bdbf10279b6ad916e534e90e102fcce04014/favicon/pomjs-logo.png
--------------------------------------------------------------------------------
/favicon/safari-pinned-tab.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
28 |
--------------------------------------------------------------------------------
/favicon/site.webmanifest:
--------------------------------------------------------------------------------
1 | {
2 | "name": "\u00d6ppet Moln",
3 | "short_name": "\u00d6ppet Moln",
4 | "icons": [
5 | {
6 | "src": "https://password.oppetmoln.se/favicon/android-chrome-192x192.png",
7 | "sizes": "192x192",
8 | "type": "image/png"
9 | },
10 | {
11 | "src": "https://password.oppetmoln.se/favicon/android-chrome-256x256.png",
12 | "sizes": "256x256",
13 | "type": "image/png"
14 | }
15 | ],
16 | "theme_color": "#ffffff",
17 | "background_color": "#ffffff",
18 | "display": "standalone"
19 | }
20 |
--------------------------------------------------------------------------------
/favicon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joho1968/POMjs/6b77bdbf10279b6ad916e534e90e102fcce04014/favicon_32.png
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | POMjs - Random Password Generator
20 | POMjs - Slumpmässigt Lösenord
21 | POMjs - Zufallsgenerator für Passwörter
22 | POMjs - Véletlenszerű jelszógenerátor
23 | POMjs - Willekeurig Wachtwoordgenerator
24 | POMjs - Zoufallspasswuertgenerator
25 | POMjs - Générateur de mot de passe au hazard
26 | POMjs - Salasanageneraattori
27 | POMjs - Generator Naključnih Gesel
28 |
29 |
30 |
31 |
32 |
33 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
89 |
90 |
91 |
94 |
95 |
96 |
97 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
166 |
167 |
168 |
169 |
170 |
--------------------------------------------------------------------------------
/js/password-om.js:
--------------------------------------------------------------------------------
1 | /**
2 | * POMjs 1.1.4
3 | *
4 | * password-om.js
5 | *
6 | * Plain vanilla javascript for the "Öppet Moln" ("Open Cloud") random password
7 | * generator site (password.oppetmoln.se). For the sake of having a name, it
8 | * shall be POMjs. There's really nothing fancy going on here :-)
9 | *
10 | * Copyright 2022, 2023 Joaquim Homrighausen; All rights reserved.
11 | * Development sponsored by WebbPlatsen i Sverige AB
12 | * https://www.webbplatsen.se
13 | *
14 | * This file is part of POMjs. POMjs is free software.
15 | *
16 | * You may redistribute it and/or modify it under the terms of the
17 | * GNU General Public License version 2, as published by the Free Software
18 | * Foundation.
19 | *
20 | * POMjs is distributed in the hope that it will be useful, but WITHOUT ANY
21 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
22 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
23 | * details.
24 | *
25 | * You should have received a copy of the GNU General Public License
26 | * along with the POMjs package. If not, write to:
27 | * The Free Software Foundation, Inc.,
28 | * 51 Franklin Street, Fifth Floor
29 | * Boston, MA 02110-1301, USA.
30 | */
31 |
32 | /* Some globals, to be filled by script */
33 |
34 | var POM_cfgLanguage = 'noLang?';
35 | var POM_cfgTitle = 'noTitle?';
36 | var POM_cfgSlogan = 'noSlogan?';
37 | var POM_cfgGenPasswordHint = 'noHint?';
38 | const POM_strUppercase = POM_genAlphabet(true);
39 | const POM_strLowercase = POM_genAlphabet(false);
40 | const POM_strDigits = POM_genDigits();
41 | const POM_strSpecialOne = '-._#$@%!';
42 | const POM_strSpecialTwo = '"+(){}[]?&,*<>|:;^';
43 |
44 | /* Easy customization of defaults, etc */
45 | const POM_strUppercase_Default = true;
46 | const POM_strLowercase_Default = true;
47 | const POM_strDigits_Default = true;
48 | const POM_strSpecialOne_Default = true;
49 | const POM_strSpecialTwo_Default = false;
50 | const POM_mkPasswordOnLoad = true;
51 | const POM_changeIsClick = true;
52 | const POM_minLength = 16;
53 | const POM_maxLength = 256;
54 | const POM_sliderStep = 8;
55 | const POM_debug = false;
56 |
57 | /* Generate some strings */
58 | function POM_genAlphabet(isUpper = false) {
59 | return [...Array(26)].map((_, i) => String.fromCharCode(i + (isUpper ? 65 : 97))).join('');
60 | }
61 | function POM_genDigits() {
62 | return [...Array(10)].map((_, i) => String.fromCharCode(i + 48)).join('');
63 | }
64 | /* Distill string down to unique characters by using a set */
65 | function POM_distillString(s) {
66 | s = s.split('');
67 | s = new Set(s);
68 | s = [...s].join('+');
69 | return(s);
70 | }
71 | /* Escape special regex characters in string, from MDN */
72 | function POM_escapeRegExp(s) {
73 | return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
74 | }
75 | /* Validate "manual input" */
76 | function POM_validateNumInput() {
77 | let mkLengthSlider = document.getElementById('mk-password-len-slider');
78 | if (mkLengthSlider) {
79 | if (this.value === '') {
80 | this.value = POM_minLength;
81 | }
82 | mkLengthSlider.value = this.value;
83 | if (mkLengthSlider.value < POM_minLength) {
84 | mkLengthSlider.value = POM_minLength;
85 | } else if (mkLengthSlider.value > POM_maxLength) {
86 | mkLengthSlider.value = POM_maxLength;
87 | }
88 | this.value = mkLengthSlider.value;
89 | }
90 | if (POM_changeIsClick) {
91 | document.getElementById('mk-password-btn').click();
92 | }
93 | }
94 | /* Validate "manual input" */
95 | function POM_generatePassword() {
96 | let strengthP = document.getElementById('mk-password-strength');
97 | strengthP.style.background = 'inherit';
98 | strengthP.style.width = '0';
99 | strengthP.style.transition = 'none';
100 | let passwordField = document.getElementById('mk-password-field');
101 | passwordField.value = '';
102 | passwordField.classList.remove('mk-password-field-focus');
103 | let mkLengthField = document.getElementById('mk-length-field');
104 | if (POM_debug) {
105 | console.clear();
106 | }
107 | if (mkLengthField) {
108 | if (mkLengthField.value >= POM_minLength && mkLengthField.value <= POM_maxLength) {
109 | let passwordSource = '';
110 | if (document.getElementById('mk-uppercase-select').checked) {
111 | passwordSource += POM_strUppercase;
112 | }
113 | if (document.getElementById('mk-special-one-select').checked) {
114 | passwordSource += (POM_strSpecialOne + POM_strSpecialOne);
115 | }
116 | if (document.getElementById('mk-digits-select').checked) {
117 | passwordSource += POM_strDigits;
118 | }
119 | if (document.getElementById('mk-lowercase-select').checked) {
120 | passwordSource += POM_strLowercase;
121 | }
122 | if (document.getElementById('mk-digits-select').checked) {
123 | passwordSource += POM_strDigits;
124 | }
125 | if (document.getElementById('mk-special-two-select').checked) {
126 | passwordSource += (POM_strSpecialTwo + POM_strSpecialTwo);
127 | }
128 | if (passwordSource.length>0) {
129 | let passwordGen = '';
130 | let theChar = '';
131 | for (let i = 0; i < mkLengthField.value; i++) {
132 | const charPos = Math.floor(Math.random() * passwordSource.length);
133 | theChar = passwordSource[charPos];
134 | passwordGen += theChar;
135 | }
136 | passwordField.value = passwordGen;
137 |
138 | let scoreP = 0;/* Password strength score, max is 8 */
139 | let searchStr;
140 | let re;
141 |
142 | /* See if password contains uppercase characters */
143 | searchStr = '[' + POM_escapeRegExp(POM_strUppercase) + ']';
144 | if (POM_debug) {
145 | console.log('Using ' + searchStr + ' to scan password');
146 | }
147 | re = new RegExp(searchStr);
148 | if (re.test(passwordGen)) {
149 | scoreP++;
150 | if (POM_debug) {
151 | console.log('Password contains UPPERCASE');
152 | }
153 | } else {
154 | if (POM_debug) {
155 | console.log('Password does NOT contain UPPERCASE');
156 | }
157 | }
158 | /* See if password contains lowercase characters */
159 | searchStr = '[' + POM_escapeRegExp(POM_strLowercase) + ']';
160 | if (POM_debug) {
161 | console.log('Using ' + searchStr + ' to scan password');
162 | }
163 | re = new RegExp(searchStr);
164 | if (re.test(passwordGen)) {
165 | scoreP++;
166 | if (POM_debug) {
167 | console.log('Password contains lowercase');
168 | }
169 | } else {
170 | if (POM_debug) {
171 | console.log('Password does NOT contain lowercase');
172 | }
173 | }
174 | /* See if password contains digits characters */
175 | searchStr = '[' + POM_escapeRegExp(POM_strDigits) + ']';
176 | if (POM_debug) {
177 | console.log('Using ' + searchStr + ' to scan password');
178 | }
179 | re = new RegExp(searchStr);
180 | if (re.test(passwordGen)) {
181 | scoreP++;
182 | if (POM_debug) {
183 | console.log('Password contains digits');
184 | }
185 | } else {
186 | if (POM_debug) {
187 | console.log('Password does NOT contain digits');
188 | }
189 | }
190 | /* See if password contains specialOne characters */
191 | searchStr = '[' + POM_escapeRegExp(POM_strSpecialOne) + ']';
192 | if (POM_debug) {
193 | console.log('Using ' + searchStr + ' to scan password');
194 | }
195 | re = new RegExp(searchStr);
196 | if (re.test(passwordGen)) {
197 | scoreP++;
198 | if (POM_debug) {
199 | console.log('Password contains specialOne');
200 | }
201 | } else {
202 | if (POM_debug) {
203 | console.log('Password does NOT contain specialOne');
204 | }
205 | }
206 | /* See if password contains specialtwo characters */
207 | searchStr = '[' + POM_escapeRegExp(POM_strSpecialTwo) + ']';
208 | if (POM_debug) {
209 | console.log('Using ' + searchStr + ' to scan password');
210 | }
211 | re = new RegExp(searchStr);
212 | if (re.test(passwordGen)) {
213 | scoreP++;
214 | if (POM_debug) {
215 | console.log('Password contains specialTwo');
216 | }
217 | } else {
218 | if (POM_debug) {
219 | console.log('Password does NOT contain specialTwo');
220 | }
221 | }
222 | /* Bump score if password is > 7 characters */
223 | if (passwordGen.length > 7) {
224 | scoreP++;
225 | if (POM_debug) {
226 | console.log('Password >7 characters, buping score');
227 | }
228 | }
229 | /* Bump score if password is > 15 characters */
230 | if (passwordGen.length > 15) {
231 | scoreP++;
232 | if (POM_debug) {
233 | console.log('Password >15 characters, buping score');
234 | }
235 | }
236 | /* Bump score if password is > 31 characters */
237 | if (passwordGen.length > 31) {
238 | scoreP += 2;
239 | if (POM_debug) {
240 | console.log('Password >31 characters, buping score');
241 | }
242 | }
243 | /* Bump score if password is > 63 characters */
244 | if (passwordGen.length > 63) {
245 | scoreP += 4;
246 | if (POM_debug) {
247 | console.log('Password >63 characters, buping score');
248 | }
249 | }
250 | /* Let's not overflooooow */
251 | if (scoreP > 8) {
252 | scoreP = 8;
253 | }
254 | if (scoreP > 6) {
255 | strengthP.style.background = '#27ce60';
256 | } else if (scoreP > 5) {
257 | strengthP.style.background = '#27ae60';
258 | } else if (scoreP > 3) {
259 | strengthP.style.background = '#FFC300';
260 | } else {
261 | strengthP.style.background = '#C0392B';
262 | }
263 | strengthP.style.width = (scoreP * 12.5) + '%';
264 | strengthP.style.transition = 'width 0.3s ease-in';
265 | }
266 | }
267 | }
268 | }
269 | /* Copy content of generated password field, if any, to clipboard */
270 | function POM_copyPassword() {
271 | let passwordField = document.getElementById('mk-password-field');
272 | if (passwordField && passwordField.value.length > 0) {
273 | if (navigator && navigator.clipboard && navigator.clipboard.writeText) {
274 | /* Use "modern" method */
275 | navigator.clipboard.writeText(passwordField.value).then(function() {
276 | passwordField.classList.add('mk-password-field-focus');
277 | }, function(e) {
278 | alert("Could not copy text: " + e);
279 | });
280 | } else {
281 | /* Use legacy method */
282 | var theText = document.createElement('textarea');
283 | theText.value = passwordField.value;
284 | theText.setAttribute('readonly', '');
285 | theText.style.position = 'absolute';
286 | theText.style.top = '-6969px';
287 | theText.style.left = '-6969px';
288 | document.body.appendChild(theText);
289 | theText.focus();
290 | theText.select();
291 | try {
292 | var goodCopy = document.execCommand('copy');
293 | if (goodCopy) {
294 | passwordField.classList.add('mk-password-field-focus');
295 | } else {
296 | alert('That did not work');
297 | }
298 | } catch(e) {
299 | alert('Could not copy text: ' + e.message);
300 | }
301 | document.body.removeChild(theText);
302 | }
303 | }
304 | }
305 | /* Initialize */
306 | function POM_initialSetup() {
307 | /* Setup, language strings, etc. Ugly, but it works :-) */
308 | if (navigator.language) {
309 | POM_cfgLanguage = navigator.language;
310 | if (POM_debug) {
311 | console.log("Language: " + POM_cfgLanguage);
312 | }
313 | let dashPos = POM_cfgLanguage.indexOf('-');
314 | if (dashPos && dashPos>0) {
315 | POM_cfgLanguage = POM_cfgLanguage.substring(0, dashPos);
316 | }
317 | POM_cfgLanguage = POM_cfgLanguage.toLowerCase();
318 | } else {
319 | POM_cfgLanguage = '???';
320 | }
321 | /* Add your translation here */
322 | switch(POM_cfgLanguage) {
323 | case 'sv':
324 | case 'se':
325 | POM_cfgTitle = 'Slumpmässigt Lösenord';
326 | POM_cfgSlogan = 'Inga kakor, ingen spårning. Bara lösenord.';
327 | POM_cfgGenPasswordHint = 'Generera lösenord';
328 | break;
329 | case 'de':
330 | /* Thank you Peter Hampf */
331 | POM_cfgTitle = 'Zufallsgenerator für Passwörter';
332 | POM_cfgSlogan = 'Keine Cookies, keine Tracker. Nur Passwörter.';
333 | POM_cfgGenPasswordHint = 'Passwort generieren';
334 | break;
335 | case 'hu':
336 | /* Thank you Mihaly Balassy */
337 | POM_cfgTitle = 'Véletlenszerű jelszógenerátor';
338 | POM_cfgSlogan = 'Cookie-k nélkül, nyomkövetők nélkül. Csak jelszavak.';
339 | POM_cfgGenPasswordHint = 'Jelszó generálása';
340 | break;
341 | case 'nl':
342 | /* Thank you Jeroen van de Leur */
343 | POM_cfgTitle = 'Willekeurig Wachtwoord Generator';
344 | POM_cfgSlogan = 'Geen cookies, geen trackers. Uitsluitend wachtwoorden.';
345 | POM_cfgGenPasswordHint = 'Genereer wachtwoord';
346 | break;
347 | case 'lb':
348 | /* Thank you Alain Fontaine */
349 | POM_cfgTitle = 'Zoufallspasswuertgenerator';
350 | POM_cfgSlogan = 'Keng Cookien, keng Trackeren. Nemme Passwierder.';
351 | POM_cfgGenPasswordHint = 'Passwuert genereieren';
352 | break;
353 | case 'fr':
354 | /* Thank you Alain Fontaine */
355 | POM_cfgTitle = 'Générateur de mot de passe au hazard';
356 | POM_cfgSlogan = 'Pas de cookies, pas de traceurs. Juste des mots de passe.';
357 | POM_cfgGenPasswordHint = 'Générer mot de passe';
358 | break;
359 | case 'fi':
360 | /* Thank you Thomas Raehalme */
361 | POM_cfgTitle = 'Salasanageneraattori';
362 | POM_cfgSlogan = 'Ei evästeitä, ei seurantaa. Vain salasanoja.';
363 | POM_cfgGenPasswordHint = 'Generoi salasana';
364 | break;
365 | case 'sl':
366 | /* Thank you Gregor Godler */
367 | POM_cfgTitle = 'Generator Naključnih Gesel';
368 | POM_cfgSlogan = 'Brez piškotkov, nič sledilnikov. Samo geslo.';
369 | POM_cfgGenPasswordHint = 'Generiraj geslo';
370 | break;
371 | default:
372 | POM_cfgTitle = 'Random Password Generator';
373 | POM_cfgSlogan = 'No cookies, no trackers. Just passwords.';
374 | POM_cfgGenPasswordHint = 'Generate password';
375 | break;
376 | }
377 | /* Paint "HTML" with language strings */
378 | document.getElementById('cfg-page-title').innerHTML = POM_cfgTitle;
379 | document.getElementById('cfg-page-slogan').innerHTML = POM_cfgSlogan;
380 | document.getElementById('cfg-page-lang').innerHTML = '[' + POM_cfgLanguage + ']';
381 | document.getElementById('mk-password-btn').title = POM_cfgGenPasswordHint;
382 | /* Set reasonable defaults */
383 | document.getElementById('mk-uppercase-select').checked = POM_strUppercase_Default;
384 | document.getElementById('mk-lowercase-select').checked = POM_strLowercase_Default;
385 | document.getElementById('mk-digits-select').checked = POM_strDigits_Default;
386 | document.getElementById('mk-special-one-select').checked = POM_strSpecialOne_Default;
387 | document.getElementById('mk-special-two-select').checked = POM_strSpecialTwo_Default;
388 |
389 | document.getElementById('mk-password-field').value = '';
390 | let mkPasswordSlider = document.getElementById('mk-password-len-slider');
391 | if (mkPasswordSlider) {
392 | mkPasswordSlider.value = POM_minLength;
393 | mkPasswordSlider.setAttribute("min", POM_minLength);
394 | mkPasswordSlider.setAttribute("max", POM_maxLength);
395 | mkPasswordSlider.step = POM_sliderStep;
396 | }
397 | document.getElementById('mk-length-field').value = POM_minLength;
398 | /* Paint "HTML" with password source */
399 | document.getElementById("gen-uppercase").innerText = POM_strUppercase;
400 | document.getElementById("gen-lowercase").innerText = POM_strLowercase;
401 | document.getElementById("gen-digits").innerText = POM_strDigits;
402 | document.getElementById("gen-special-one").innerText = POM_strSpecialOne;
403 | document.getElementById("gen-special-two").innerText = POM_strSpecialTwo;
404 | /* Add timestamp, for no good reason :) */
405 | document.getElementById("gen-timestamp").innerText = Date.now();
406 | /* Add some event handlers */
407 | document.getElementById('mk-password-len-slider').addEventListener('input', function() {
408 | let mkLengthField = document.getElementById('mk-length-field');
409 | if (mkLengthField) {
410 | mkLengthField.value = this.value;
411 | if (mkLengthField.value < POM_minLength) {
412 | mkLengthField.value = POM_minLength;
413 | } else if (mkLengthField.value > POM_maxLength) {
414 | mkLengthField.value = POM_maxLength;
415 | }
416 | this.value = mkLengthField.value;
417 | }
418 | });
419 | document.getElementById('mk-length-field').addEventListener('click', function() {
420 | this.select();
421 | });
422 | document.getElementById('mk-length-field').addEventListener('blur', POM_validateNumInput);
423 | document.getElementById('mk-length-field').addEventListener('change', POM_validateNumInput);
424 | document.getElementById('mk-password-btn').addEventListener('click', POM_generatePassword);
425 | document.getElementById('mk-password-field').addEventListener('click', POM_copyPassword);
426 | /* Possibly generate password on load */
427 | if (POM_mkPasswordOnLoad) {
428 | document.getElementById('mk-password-btn').click();
429 | }
430 | /* Possibly generate password on configuration changes */
431 | if (POM_changeIsClick) {
432 | document.getElementById('mk-uppercase-select').addEventListener('click', POM_generatePassword);
433 | document.getElementById('mk-special-one-select').addEventListener('click', POM_generatePassword);
434 | document.getElementById('mk-digits-select').addEventListener('click', POM_generatePassword);
435 | document.getElementById('mk-lowercase-select').addEventListener('click', POM_generatePassword);
436 | document.getElementById('mk-digits-select').addEventListener('click', POM_generatePassword);
437 | document.getElementById('mk-special-two-select').addEventListener('click', POM_generatePassword);
438 | document.getElementById('mk-password-len-slider').addEventListener('change', POM_generatePassword);
439 | }
440 |
441 | }
442 |
443 |
444 | /* Wait for things to be loaded */
445 | if (document.readyState === "complete" ||
446 | (document.readyState !== "loading" && !document.documentElement.doScroll)) {
447 | POM_initialSetup();
448 | } else {
449 | document.addEventListener("DOMContentLoaded", POM_initialSetup);
450 | }
451 |
452 | /* end of file "password-om.js" */
453 |
--------------------------------------------------------------------------------
/js/password-om.min.js:
--------------------------------------------------------------------------------
1 | var POM_cfgLanguage="noLang?",POM_cfgTitle="noTitle?",POM_cfgSlogan="noSlogan?",POM_cfgGenPasswordHint="noHint?";const POM_strUppercase=POM_genAlphabet(!0),POM_strLowercase=POM_genAlphabet(!1),POM_strDigits=POM_genDigits(),POM_strSpecialOne="-._#$@%!",POM_strSpecialTwo='"+(){}[]?&,*<>|:;^',POM_strUppercase_Default=!0,POM_strLowercase_Default=!0,POM_strDigits_Default=!0,POM_strSpecialOne_Default=!0,POM_strSpecialTwo_Default=!1,POM_mkPasswordOnLoad=!0,POM_changeIsClick=!0,POM_minLength=16,POM_maxLength=256,POM_sliderStep=8,POM_debug=!1;function POM_genAlphabet(e=!1){return[...Array(26)].map((t,n)=>String.fromCharCode(n+(e?65:97))).join("")}function POM_genDigits(){return[...Array(10)].map((e,t)=>String.fromCharCode(t+48)).join("")}function POM_distillString(e){return e=e.split(""),e=[...e=new Set(e)].join("+")}function POM_escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function POM_validateNumInput(){let e=document.getElementById("mk-password-len-slider");e&&(""===this.value&&(this.value=16),e.value=this.value,e.value<16?e.value=16:e.value>256&&(e.value=256),this.value=e.value),document.getElementById("mk-password-btn").click()}function POM_generatePassword(){let e=document.getElementById("mk-password-strength");e.style.background="inherit",e.style.width="0",e.style.transition="none";let t=document.getElementById("mk-password-field");t.value="",t.classList.remove("mk-password-field-focus");let n=document.getElementById("mk-length-field");if(n&&n.value>=16&&n.value<=256){let s="";if(document.getElementById("mk-uppercase-select").checked&&(s+=POM_strUppercase),document.getElementById("mk-special-one-select").checked&&(s+=POM_strSpecialOne+POM_strSpecialOne),document.getElementById("mk-digits-select").checked&&(s+=POM_strDigits),document.getElementById("mk-lowercase-select").checked&&(s+=POM_strLowercase),document.getElementById("mk-digits-select").checked&&(s+=POM_strDigits),document.getElementById("mk-special-two-select").checked&&(s+=POM_strSpecialTwo+POM_strSpecialTwo),s.length>0){let a="",l="";for(let i=0;i7&&c++,a.length>15&&c++,a.length>31&&(c+=2),a.length>63&&(c+=4),c>8&&(c=8),c>6?e.style.background="#27ce60":c>5?e.style.background="#27ae60":c>3?e.style.background="#FFC300":e.style.background="#C0392B",e.style.width=12.5*c+"%",e.style.transition="width 0.3s ease-in"}}}function POM_copyPassword(){let e=document.getElementById("mk-password-field");if(e&&e.value.length>0){if(navigator&&navigator.clipboard&&navigator.clipboard.writeText)navigator.clipboard.writeText(e.value).then(function(){e.classList.add("mk-password-field-focus")},function(e){alert("Could not copy text: "+e)});else{var t=document.createElement("textarea");t.value=e.value,t.setAttribute("readonly",""),t.style.position="absolute",t.style.top="-6969px",t.style.left="-6969px",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")?e.classList.add("mk-password-field-focus"):alert("That did not work")}catch(n){alert("Could not copy text: "+n.message)}document.body.removeChild(t)}}}function POM_initialSetup(){if(navigator.language){let e=(POM_cfgLanguage=navigator.language).indexOf("-");e&&e>0&&(POM_cfgLanguage=POM_cfgLanguage.substring(0,e)),POM_cfgLanguage=POM_cfgLanguage.toLowerCase()}else POM_cfgLanguage="???";switch(POM_cfgLanguage){case"sv":case"se":POM_cfgTitle="Slumpm\xe4ssigt L\xf6senord",POM_cfgSlogan='Inga kakor, ingen sp\xe5rning. Bara l\xf6senord.',POM_cfgGenPasswordHint="Generera l\xf6senord";break;case"de":POM_cfgTitle="Zufallsgenerator f\xfcr Passw\xf6rter",POM_cfgSlogan='Keine Cookies, keine Tracker. Nur Passw\xf6rter.',POM_cfgGenPasswordHint="Passwort generieren";break;case"hu":POM_cfgTitle="V\xe9letlenszerű jelsz\xf3gener\xe1tor",POM_cfgSlogan='Cookie-k n\xe9lk\xfcl, nyomk\xf6vetők n\xe9lk\xfcl. Csak jelszavak.',POM_cfgGenPasswordHint="Jelsz\xf3 gener\xe1l\xe1sa";break;case"nl":POM_cfgTitle="Willekeurig Wachtwoord Generator",POM_cfgSlogan='Geen cookies, geen trackers. Uitsluitend wachtwoorden.',POM_cfgGenPasswordHint="Genereer wachtwoord";break;case"lb":POM_cfgTitle="Zoufallspasswuertgenerator",POM_cfgSlogan='Keng Cookien, keng Trackeren. Nemme Passwierder.',POM_cfgGenPasswordHint="Passwuert genereieren";break;case"fr":POM_cfgTitle="G\xe9n\xe9rateur de mot de passe au hazard",POM_cfgSlogan='Pas de cookies, pas de traceurs. Juste des mots de passe.',POM_cfgGenPasswordHint="G\xe9n\xe9rer mot de passe";break;case"fi":POM_cfgTitle="Salasanageneraattori",POM_cfgSlogan='Ei ev\xe4steit\xe4, ei seurantaa. Vain salasanoja.',POM_cfgGenPasswordHint="Generoi salasana";break;case"sl":POM_cfgTitle="Generator Naključnih Gesel",POM_cfgSlogan='Brez piškotkov, nič sledilnikov. Samo geslo.',POM_cfgGenPasswordHint="Generiraj geslo";break;default:POM_cfgTitle="Random Password Generator",POM_cfgSlogan='No cookies, no trackers. Just passwords.',POM_cfgGenPasswordHint="Generate password"}document.getElementById("cfg-page-title").innerHTML=POM_cfgTitle,document.getElementById("cfg-page-slogan").innerHTML=POM_cfgSlogan,document.getElementById("cfg-page-lang").innerHTML="["+POM_cfgLanguage+"]",document.getElementById("mk-password-btn").title=POM_cfgGenPasswordHint,document.getElementById("mk-uppercase-select").checked=!0,document.getElementById("mk-lowercase-select").checked=!0,document.getElementById("mk-digits-select").checked=!0,document.getElementById("mk-special-one-select").checked=!0,document.getElementById("mk-special-two-select").checked=!1,document.getElementById("mk-password-field").value="";let t=document.getElementById("mk-password-len-slider");t&&(t.value=16,t.setAttribute("min",16),t.setAttribute("max",256),t.step=8),document.getElementById("mk-length-field").value=16,document.getElementById("gen-uppercase").innerText=POM_strUppercase,document.getElementById("gen-lowercase").innerText=POM_strLowercase,document.getElementById("gen-digits").innerText=POM_strDigits,document.getElementById("gen-special-one").innerText=POM_strSpecialOne,document.getElementById("gen-special-two").innerText=POM_strSpecialTwo,document.getElementById("gen-timestamp").innerText=Date.now(),document.getElementById("mk-password-len-slider").addEventListener("input",function(){let e=document.getElementById("mk-length-field");e&&(e.value=this.value,e.value<16?e.value=16:e.value>256&&(e.value=256),this.value=e.value)}),document.getElementById("mk-length-field").addEventListener("click",function(){this.select()}),document.getElementById("mk-length-field").addEventListener("blur",POM_validateNumInput),document.getElementById("mk-length-field").addEventListener("change",POM_validateNumInput),document.getElementById("mk-password-btn").addEventListener("click",POM_generatePassword),document.getElementById("mk-password-field").addEventListener("click",POM_copyPassword),document.getElementById("mk-password-btn").click(),document.getElementById("mk-uppercase-select").addEventListener("click",POM_generatePassword),document.getElementById("mk-special-one-select").addEventListener("click",POM_generatePassword),document.getElementById("mk-digits-select").addEventListener("click",POM_generatePassword),document.getElementById("mk-lowercase-select").addEventListener("click",POM_generatePassword),document.getElementById("mk-digits-select").addEventListener("click",POM_generatePassword),document.getElementById("mk-special-two-select").addEventListener("click",POM_generatePassword),document.getElementById("mk-password-len-slider").addEventListener("change",POM_generatePassword)}"complete"!==document.readyState&&("loading"===document.readyState||document.documentElement.doScroll)?document.addEventListener("DOMContentLoaded",POM_initialSetup):POM_initialSetup();
--------------------------------------------------------------------------------
/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow: /css
3 |
--------------------------------------------------------------------------------
/site.webmanifest:
--------------------------------------------------------------------------------
1 | {
2 | "name": "\u00d6ppet Moln",
3 | "short_name": "\u00d6ppet Moln",
4 | "icons": [
5 | {
6 | "src": "https://password.oppetmoln.se/favicon/android-chrome-192x192.png",
7 | "sizes": "192x192",
8 | "type": "image/png"
9 | },
10 | {
11 | "src": "https://password.oppetmoln.se/favicon/android-chrome-256x256.png",
12 | "sizes": "256x256",
13 | "type": "image/png"
14 | }
15 | ],
16 | "theme_color": "#ffffff",
17 | "background_color": "#ffffff",
18 | "display": "standalone"
19 | }
20 |
--------------------------------------------------------------------------------