PageSourceSearch

https://www.rs.gov.br/themes/rsgov2025/js/master.js?2.1.5.161.6+8

js www.rs.gov.br collected 2026-09-24 19:28:35 UTC 2,746 bytes, 88 lines download raw bytes

1$(function () {
2	$("#frmBuscaGeral").on("show.bs.collapse", function() {
3		if ($("#menuPrincipal").hasClass("in")) {
4			$("#menuPrincipal").collapse('hide');
5		}
6	});
7
8	$("#frmBuscaGeral").on("shown.bs.collapse", function() {
9		$('#buscageralTextBox').focus();
10	});
11
12	$("#menuPrincipal").on("shown.bs.collapse", function() {
13		if ($("#frmBuscaGeral").hasClass("in")) {
14			$("#frmBuscaGeral").collapse('hide');
15		}
16	});
17
18	$("#frmBuscaGeral,#frmBuscaCapa").on("submit", function () {
19		var $form = $(this);
20		var $palavrasChaves = $(this).find("[name='palavraschave']");
21		if ($palavrasChaves.length) {
22			$form.find("[name='q']").val($palavrasChaves.val());
23		}
24	});
25
26	/* Mantém um id único para busca da capa quando o do header estiver oculto */
27	if ($("#frmBuscaGeral").css("display") === "none") {
28		let input = $("#frmBuscaGeral input#buscageralTextBox");
29		input.removeAttr("id");
30	}
31
32	$("body").off("click").on("click", function(event) {
33		if ($(event.target).closest("#menuPrincipalCollapse").length === 0) {
34			$("#menuPrincipalCollapse.in").collapse('hide');
35		}
36	});
37
38	$("#rodapechat").hover(
39		function () {
40			$(this).removeClass("esconde");
41			$(this).addClass("exibe")
42		},
43		function () {
44			$(this).removeClass("exibe");
45			$(this).addClass("esconde")
46		}
47	);
48
49	$("a[accesskey='1']").on("click", function() {
50		$("#frmBuscaGeral.in").collapse('hide');
51	});
52
53	$("a[accesskey='2']").on("click", function() {
54		$("#frmBuscaGeral.in").collapse('hide');
55		if ($("#menuPrincipalCollapse.in").length === 0) {
56			$("#menuPrincipalCollapse").collapse('show');
57		}
58	});
59	$("a[accesskey='3']").on("click", function() {
60		if ($("#frmBuscaGeral.in").length === 0) {
61			$("#frmBuscaGeral").collapse('show');
62		}
63	});
64
65
66	function checkEstaNoRegistroDeslocamento(pathToCheck) {
67		var paths = ["/registro-digital-de-deslocamento", "/registro-digital-de-deslocamento-com-login"];
68		return paths.filter(function(path) {
69			return pathToCheck === path;
70		}).length > 0;
71	}
72
73
74	$(document).ajaxSuccess(function(event, xhr, settings) {
75		var estaNoRegistroDeslocamento = checkEstaNoRegistroDeslocamento(window.location.pathname);
76		var recebeuResultadoDoEnvio = settings.url === "/_service/demandalai/submit";
77		var deveRedirecionar = estaNoRegistroDeslocamento && recebeuResultadoDoEnvio;
78		if (deveRedirecionar) {
79			var $result = $("<result>" + xhr.responseText + "</result>");
80			var protocolo = encodeURIComponent($result.find("protocolo").attr("value"));
81			var token = $result.find("token").attr("value");
82			var url = "/_service/covid/deslocamento/protocolo/html?protocolo=" + protocolo + "&token=" + token;
83			window.location.replace(url);
84		}
85
86	});
87});
88

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.