PageSourceSearch

https://www12.senado.leg.br/institucional/++resource++static/js/ph…?version=2026-09-18%2013%3A42%3A49

js senado.leg.br collected 2026-09-24 08:25:45 UTC 1,672 bytes, 66 lines download raw bytes

1$(document).ready(function(){        
2	$('li img').on('click',function(){
3		var src = $(this).attr('src');
4		var img = '<img src="' + src + '" class="img-responsive"/>';
5		
6		//start of new code new code
7		var index = $(this).parent('li').index();   
8		
9		var html = '';
10		html += img;                
11		html += '<div style="height:25px;clear:both;display:block;">';
12		html += '<a class="controls next" href="'+ (index+2) + '">próximo </a>';
13		html += '<a class="controls previous" href="' + (index) + '"> anterior</a>';
14		html += '</div>';
15		
16		$('#myModal').modal();
17		$('#myModal').on('shown.bs.modal', function(){
18			$('#myModal .modal-body').html(html);
19			//new code
20			$('a.controls').trigger('click');
21		})
22		$('#myModal').on('hidden.bs.modal', function(){
23			$('#myModal .modal-body').html('');
24		});
25		
26		
27		
28		
29   });	
30})
31        
32         
33$(document).on('click', 'a.controls', function(){
34	var index = $(this).attr('href');
35	var src = $('ul.row li:nth-child('+ index +') img').attr('src');             
36	
37	$('.modal-body img').attr('src', src);
38	
39	var newPrevIndex = parseInt(index) - 1; 
40	var newNextIndex = parseInt(newPrevIndex) + 2; 
41	
42	if($(this).hasClass('previous')){               
43		$(this).attr('href', newPrevIndex); 
44		$('a.next').attr('href', newNextIndex);
45	}else{
46		$(this).attr('href', newNextIndex); 
47		$('a.previous').attr('href', newPrevIndex);
48	}
49	
50	var total = $('ul.row li').length + 1; 
51	//hide next button
52	if(total === newNextIndex){
53		$('a.next').hide();
54	}else{
55		$('a.next').show()
56	}            
57	//hide previous button
58	if(newPrevIndex === 0){
59		$('a.previous').hide();
60	}else{
61		$('a.previous').show()
62	}
63	
64	
65	return false;
66});

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.