Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
css:wrap_avillepreux [2024/10/30 12:07] – avillepreux | css:wrap_avillepreux [2024/12/12 17:40] (Version actuelle) – avillepreux | ||
---|---|---|---|
Ligne 23: | Ligne 23: | ||
gap: 0.3em; | gap: 0.3em; | ||
padding: 0 0.3em; | padding: 0 0.3em; | ||
+ | vertical-align: | ||
} | } | ||
.wrap_username: | .wrap_username: | ||
Ligne 120: | Ligne 121: | ||
function is_valid_username(username) { | function is_valid_username(username) { | ||
| | ||
- | if (jQuery.isNumeric(username)) return false; | + | if (jQuery.isNumeric(username)) return false; |
- | + | ||
username = username.trim().toLowerCase(); | username = username.trim().toLowerCase(); | ||
- | + | if (jQuery.isNumeric(username)) return false; | |
- | return | + | if (username.length |
+ | |||
+ | if (jQuery.inArray(username, | ||
" | " | ||
- | " | + | " |
+ | " | ||
+ | |||
+ | ]) >= 0) return false; | ||
- | ])); | + | return true; |
} | } | ||
| | ||
Ligne 140: | Ligne 145: | ||
if (typeof id !== " | if (typeof id !== " | ||
{ | { | ||
- | console.log(" | ||
- | |||
if (is_valid_username(id)) { | if (is_valid_username(id)) { | ||
init_username_wrap(wrap_element, | init_username_wrap(wrap_element, | ||
Ligne 151: | Ligne 154: | ||
classList.forEach(function (className) { | classList.forEach(function (className) { | ||
- | | ||
- | console.log(" | ||
| | ||
var username = className.replace(" | var username = className.replace(" | ||
+ | | ||
if (is_valid_username(username)) { | if (is_valid_username(username)) { | ||
+ | |||
init_username_wrap(wrap_element, | init_username_wrap(wrap_element, | ||
} | } |