PageSourceSearch

https://singpolyma.net/wordpress/wp-content/plugins/openid/f/openid.js?ver=519

js singpolyma.net collected 2026-10-03 02:34:02 UTC 1,879 bytes, 64 lines download raw bytes

1/* yuicompress openid.js -o openid.min.js
2 * @see http://developer.yahoo.com/yui/compressor/
3 */
4
5jQuery(function() {
6	jQuery('#openid_system_status').hide();
7
8	jQuery('#openid_status_link').click( function() {
9		jQuery('#openid_system_status').toggle();
10		return false;
11	});
12});
13
14function stylize_profilelink() {
15	jQuery("#commentform a[href$='profile.php']").addClass('openid_link');
16}
17
18/**
19 * Properly integrate the 'Authenticate with OpenID' checkbox into the comment form.
20 * This will move the checkbox below the Website field, and add an AJAX hook to 
21 * show/hide the checkbox depending on whether the given URL is a valid OpenID.
22 */
23function add_openid_to_comment_form(wp_url, nonce) {
24	var openid_nonce = nonce;
25
26	var openid_comment = jQuery('#openid_comment');
27	var openid_checkbox = jQuery('#login_with_openid');
28	var url = jQuery('#url');
29
30	jQuery('label[for="url"],#url').filter(':last').after(openid_comment.hide());
31
32	if ( url.val() ) check_openid( url );
33	url.blur( function() { check_openid(jQuery(this)); } );
34
35
36	/**
37	 * Make AJAX call to WordPress to check if the given URL is a valid OpenID.
38	 * AJAX response should be a JSON structure with two values:
39	 *   'valid' - (boolean) whether or not the given URL is a valid OpenID
40	 *   'nonce' - (string) new nonce to use for next AJAX call
41	 */
42	function check_openid( url ) {
43		url.addClass('openid_loading');
44
45		if ( url.val() == '' ) {
46			openid_checkbox.attr('checked', '');
47			openid_comment.slideUp();
48			return;
49		} 
50
51		jQuery.getJSON(wp_url + '?openid=ajax', {url: url.val(), _wpnonce: openid_nonce}, function(data, textStatus) {
52			url.removeClass('openid_loading');
53			if ( data.valid ) {
54				openid_checkbox.attr('checked', 'checked');
55				openid_comment.slideDown();
56			} else {
57				openid_checkbox.attr('checked', '');
58				openid_comment.slideUp();
59			}
60			openid_nonce = data.nonce;
61		});
62	}
63}
64

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.