blob: 3d2905a44735493c4ddb8d653d5d94b3e8eb464d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
<?php if (0): ?><script><?php endif; ?>
// add ?persistent to login link
elgg.register_hook_handler('init', 'system', function() {
$('form.elgg-form-login').each(function () {
var link = $('.login_with_twitter a', this).get(0),
$input = $('input[name="persistent"]', this);
function sync() {
link.href = link.href.replace(/\?.*/, '') + ($input[0].checked ? '?persistent' : '');
}
if (link && $input.length) {
sync();
$input.change(sync);
}
});
});
|