1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-12-04 10:24:42 +02:00

[Web] ROT13 footer html

This commit is contained in:
andryyy 2020-05-16 12:51:01 +02:00
parent 15af981caa
commit 18ba4d2c9c
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
2 changed files with 9 additions and 2 deletions

View File

@ -183,7 +183,7 @@ $(document).ready(function() {
<div class="container footer">
<?php if (!empty($UI_TEXTS['ui_footer'])) { ?>
<hr><?=$UI_TEXTS['ui_footer'];?>
<hr><span class="footer-text-enc"><?=str_rot13($UI_TEXTS['ui_footer']);?></span>
<?php } ?>
</div>
</body>

View File

@ -24,7 +24,14 @@ $(document).ready(function() {
$(this).closest("form").find('[data-pwgen-field]').attr('type', 'text');
$(this).closest("form").find('[data-pwgen-field]').val(random_passwd);
});
function str_rot13(str) {
return (str + '').replace(/[a-z]/gi, function(s){
return String.fromCharCode(s.charCodeAt(0) + (s.toLowerCase() < 'n' ? 13 : -13))
})
}
$(".footer-text-enc").html(function(){
return str_rot13($(".footer-text-enc").html())
});
// https://stackoverflow.com/questions/4399005/implementing-jquerys-shake-effect-with-animate
function shake(div,interval,distance,times) {
if(typeof interval === 'undefined') {