Russian passwords in Safari / Mac OS X
Today I encountered such a problem: you need to enter a password containing Russian characters. But it was not there. Safari just refused to switch the language! A simple solution would be to enter the password in TextEdit and copy it into the password field, but the body required a more elegant solution to the problem. And, remembering the tricks of CSS-jitsu and Javascript-fu, overcoming Friday's desire to go get drunk or finally go Braid, your humble servant rushed into battle ...
The solution was surprisingly simple, but the path to it was quite a long one. The first and most obvious step was to replace all fields of type password with fields of type text. But here's how to hide the text entered by the user back? The first trial solution was to make the text transparent:
The solution was surprisingly simple, but the path to it was quite a long one. The first and most obvious step was to replace all fields of type password with fields of type text. But here's how to hide the text entered by the user back? The first trial solution was to make the text transparent:
color: rgba(0,0,0,0)
. But in this case, the user simply did not see how many characters he entered, and whether the field is empty at all. In short, after a long search on Surfin 'Safari, I came across a wonderful CSS property -webkit-text-security
:! This property forces any Safari starting from the third version to display disks ( -webkit-text-security: disk
), circles ( -webkit-text-security: circle
) or squares ( -webkit-text-security: square
) instead of text . As a result, we have the following javascript function:
function() { var F = document.forms; for(var j=0; j
But the bookmark, which should be dragged into the bookmarks bar and used, I (for obvious reasons) can not be placed here. Therefore, I will give only its code:javascript:(function(){var F=document.forms;for(var j=0;j
Пользуйтесь на здоровье. ;-)
p.s. Если кто-то знает, как искоренить эту проблемы кардинально, я буду рад выслушать и снести этот пост нафиг. Судя по всему корень проблемы скрыт в недрах самой операционки, т.к. подобным образом себя ведут все поля паролей в Mac OS X (у меня 10.5.7).