PageSourceSearch

https://www.above.com/js/login.js?1790916611

js above.com collected 2026-10-03 19:47:03 UTC 2,116 bytes, 81 lines download raw bytes

1// JavaScript Document
2$(document).ready(function(){
3	$('#login-trigger').click(function(){
4		$(this).next('#login-content').slideToggle();
5		$(this).toggleClass('login-active');
6		
7		if ($(this).hasClass('login-active')){
8			$(this).find('span').html('▲')
9		}
10		else{
11			$(this).find('span').html('▼')
12		}
13	})
14
15	$(document).mouseup(function(e) 
16	{
17		var container = $("#login-trigger");
18		var container1 = $("#login-content");
19		// if the target of the click isn't the container nor a descendant of the container
20		if ((!container.is(e.target) && container.has(e.target).length === 0) && (!container1.is(e.target) && container1.has(e.target).length === 0)) 
21		{
22			$("#login-content").hide('slide', {direction: 'up'}, 200);			
23			container.removeClass('login-active');
24			container.find('span').html('▼');
25		}
26	});
27});
28
29// as per RT: id=697578#txn-5780404
30// get form action based on the site option selected in the login form
31function get_form_action() {
32	var ele = document.getElementById('login_sites');
33    if(ele)
34    {
35	    var sites = ele.getElementsByTagName('input');
36	    var ssite = 'pm';
37	    for(var i = 0; i < sites.length; i++) {
38		    if(sites[i].name == 'site' && sites[i].checked) {
39			    ssite = sites[i].value;
40			    break;
41		    }
42	    }
43
44	    var action_url = pm_login_url;
45	    switch(ssite) {
46		    case 'mp':
47			    action_url = mp_login_url;
48			    break;
49		    case 'reg':
50			    action_url = reg_login_url;
51			    break;
52		    case 'pm':
53			    action_url = pm_login_url;
54			    break;
55	    }
56
57	    var loginFrm = get_parent_form(ele);
58	    if(loginFrm) {
59		    loginFrm.action = action_url;
60	    }
61    }
62}
63
64// get parent form
65function get_parent_form(ele) {
66	if(typeof ele === 'undefined' || ele.tagName.toLowerCase() == 'body') {
67		return false;
68	}
69
70	if(ele.tagName.toLowerCase() == 'form') {
71		return ele;
72	}
73
74	return get_parent_form(ele.parentNode);
75}
76
77// as per RT: id=697578#txn-5780404
78// set login form action on page load
79window.onload = function(e) {
80	get_form_action();
81}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.