PageSourceSearch

https://www.bibliotecanacional.gov.co/Assets/js/idioma.js

js bibliotecanacional.gov.co collected 2026-10-02 03:11:16 UTC 2,187 bytes, 68 lines download raw bytes

1//<script src="http://www.microsoftTranslator.com/ajax/v3/WidgetV3.ashx?siteData=ueOIGRSKkd965FeEGM5JtQ**" type="text/javascript"></script>
2//<script>
3   
4document.onreadystatechange = function () {
5    //if (document.readyState == 'complete') {
6		//cambiarIdioma()
7		//currentUser()       
8        
9    //}
10}
11function cambiarIdioma(){
12	var languageinfo=navigator.language? navigator.language : navigator.userLanguage
13	languageinfo = languageinfo.toLowerCase()
14	var esIngles = true;
15	if(languageinfo == 'es' || languageinfo.indexOf('es-')>=0){
16		esIngles = false
17	}
18	if(esIngles){
19		Microsoft.Translator.Widget.Translate('es', 'en', onProgress, onError, onComplete, onRestoreOriginal, 2000);
20		$('a[href*="/es-co/"]').each(function() {
21			nuevaHref = $(this).attr("href")
22			nuevaHref = nuevaHref.replace('/es-co/','/en/')
23			$(this).attr("href",nuevaHref)
24		});
25		setTimeout(function(){
26			$('a[href*="/es-co/"]').each(function() {
27					nuevaHref = $(this).attr("href")
28					nuevaHref = nuevaHref.replace('/es-co/','/en/')
29					$(this).attr("href",nuevaHref)
30				});
31		},3000)
32	}
33}
34function currentUser(){
35	  var userid= _spPageContextInfo.userId;
36	  var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/currentuser";
37	  var requestHeaders = { "accept" : "application/json;odata=verbose" };
38	  $.ajax({
39		url : requestUri,
40		contentType : "application/json;odata=verbose",
41		headers : requestHeaders,
42		success : function(data)
43		{
44			console.log(data.d.Title)
45			if(data.d.Title != "dbarrera"){
46				cambiarIdioma()
47			}
48		},
49		error : function(error){console.log(error)}
50	  });
51}
52function onProgress(value) {
53    //document.getElementById('counter').innerHTML = Math.round(value);
54}
55
56function onError(error) {
57    //alert("Translation Error: " + error);
58}
59
60function onComplete() {
61    $("#WidgetFloaterPanels").css("display","none")
62    //document.getElementById('counter').style.color = 'green';
63}
64//fires when the user clicks on the exit box of the floating widget
65function onRestoreOriginal() { 
66    //alert("The page was reverted to the original language. This message is not part of the widget.");
67}
68

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.