PageSourceSearch

https://www.u-cursos.cl/b/auth/up.js?servicio=ucursos&_LB=ucursos04-int&lang=es&recordar=1

js u-cursos.cl collected 2026-10-01 11:48:13 UTC 2,595 bytes, 65 lines download raw bytes

1var UP = {
2	show: function( id ) {
3		$('#'+id).html( navigator.cookieEnabled ? '<div id=\"auth\"><div id=\"upform\"><form id=\"login\" method=\"post\" action=\"https://www.u-cursos.cl/b/auth/api\" class=\"validar\"><input type=\"hidden\" name=\"lang\" value=\"\" /><dl><dd>&nbsp;</dd><dd><button id=\"boton_login\" type=\"submit\" class=\"boton \">Entrar con Cuenta Uchile</button></dd><dd><ul class=\"help\"><li><a href=\"https://cuenta.uchile.cl/recovery/identification\">¿Necesitas ayuda con tu Clave?</a></li></ul></dd></dl></form><div id=\"loading\" style=\"display:none\"><p class=\"loading\">Cargando...</p></div></div></div>' : '<div id="mensaje">Debes activar las cookies de tu navegador</div>' );
4		var errores = {"res":"-Error en la respuesta del proveedor de Cuenta Uchile","ext":"-Error con el proveedor de Cuenta Uchile","info":"-Error con tu informaci\u00f3n personal","user":"-No eres usuario de la plataforma"};
5		var m = location.search.match( /e=(\w+)/ );
6		if( m && m[1] && errores[ m[1] ] ) kernel.mensaje( errores[ m[1] ] );
7		$('#upform form').on( 'submit', function( e ) {
8			e.preventDefault();
9
10			let frm = $(this).hide();
11			$('#loading').show();
12
13			$( '#upform form input[type="password"]' ).each( function() {
14				$(this).data( 'plain', $(this).val() );
15				$(this).val( btoa( $(this).val() ) );
16			} );
17
18			let data = frm.serialize();
19
20			$( '#upform form input[type="password"]' ).each( function() {
21				$(this).val( $(this).data( 'plain' ) );
22			} );
23
24			$.post( frm.attr('action'), data )
25				.done( function( res ) {
26					if( res.d ) $('<div>').html( res.d ).modal();
27					if( res.m ) kernel.mensaje( '+'+res.m );
28					if( res.u ) return location.href = res.u;
29
30					$('#loading, #forgot, #cancel').hide();
31					$('#login').show();
32
33				} )
34				.fail( function( res ) {
35					frm.show();
36					$('#loading').hide();
37					kernel.mensaje( '-'+res.responseJSON.m );
38				} );
39
40		} );
41	},
42
43	forgot: function() {
44		$('#login').hide();
45		$('#forgot').show();
46		$('#forgot input[name=username]').val( $('#login input[name=username]').val() ).focus();
47	},
48
49	back: function() {
50		$('#upform form').hide();
51		$('#login').show();
52	},
53
54	reset: function( u ) {
55		quickAjax( 'https://www.u-cursos.cl/b/auth/reset?_accion=send&username='+u, function(r) {
56			r = r.evalJSON( true );
57			kernel.mensaje( ( r.status == 200 ? '+' : '-' )+( r.m || 'Ocurrió un error inesperado' ) );
58		} );
59	},
60
61	pass: function() {
62		$('#password').toggleClass( 'wrong', $('#password').val().length < 8 );
63		$('#password2').toggleClass( 'wrong', $('#password').val() != $('#password2').val() );
64	}
65};

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.