PageSourceSearch

https://www.rbojournal.org/wp-content/themes/spacious-child/assets/js/scripts.js?ver=7.0.6

js rbojournal.org collected 2026-10-02 19:16:16 UTC 12,089 bytes, 307 lines download raw bytes

1$(document).ready(function(){
2
3	verify_fixed_menu();
4
5	verifyMenuMobile();
6	verifyWidthForWidgets();
7	$('[data-toggle="tooltip"]').tooltip();
8
9	//	create a menu
10	$('#menu-mobile').mmenu({
11		slidingSubmenus: false,
12		"extensions": [
13            "position-back",
14            "position-right",
15            "pagedim-black"
16        ]
17	});
18
19	//	fire the plugin
20	$('.mh-head').mhead({
21		"scroll": {
22			"hide": 10,
23			"show": 10,
24			"tolerance": 5
25		}
26	});
27
28	$(window).scroll(function() {
29        verifyMenuMobile();
30    });
31
32	if( $('#menu-mobile').find('.social-media').length == 0 ){ //add social media on mobile menu
33		$('.social-media').clone().appendTo('#menu-mobile .mm-panels > .mm-panel');
34    }
35
36    if( $('#menu-mobile').find('.widget_icl_lang_sel_widget').length == 0 ){ //add lang switcher on mobile menu
37		$('.widget_icl_lang_sel_widget').clone().appendTo('#menu-mobile .mm-panels > .mm-panel');
38    }
39
40	$('div.altmetric-embed').on('altmetric:hide', function (){
41		$(this).remove(); //remove component if not exists
42    });
43
44    $('.__dimensions_badge_embed__').on('dimensions_embed:hide', function (){
45      	$(this).remove(); //remove component if not exists
46  	});
47
48	/*
49    //init plugin search form collapsed 
50	var sb_search = document.getElementsByClassName('sb-search');
51	Array.prototype.forEach.call(sb_search, function(item) {
52	    new UISearch( item );
53	});
54	*/
55
56	$(window).on('resize', function(){ //collapse sidebar site
57      	verifyWidthForWidgets();
58      	verify_fixed_menu();
59	});
60
61	//collapse click event widget
62	$('.widget.widget_most_viewed_articles_widget_widget').find('.widget-title').click(function(){
63		var width = $( window ).width();
64		if(width <= 991){
65			$('.widget.widget_most_viewed_articles_widget_widget').find('ul').toggle(500);
66			if($('.widget.widget_most_viewed_articles_widget_widget').find('.collapse-widget-icon').hasClass('fa-chevron-right')){
67				$('.widget.widget_most_viewed_articles_widget_widget').find('.collapse-widget-icon').removeClass('fa-chevron-right');
68				$('.widget.widget_most_viewed_articles_widget_widget').find('.collapse-widget-icon').addClass('fa-chevron-down');
69			}
70			else{
71				$('.widget.widget_most_viewed_articles_widget_widget').find('.collapse-widget-icon').removeClass('fa-chevron-down');
72				$('.widget.widget_most_viewed_articles_widget_widget').find('.collapse-widget-icon').addClass('fa-chevron-right');
73			}
74		}
75	});
76
77	$('.sidebar-site .widget.widget_keywords_cloud').find('.widget-title').click(function(){
78		var width = $( window ).width();
79		if(width <= 991){
80			$('.sidebar-site .widget.widget_keywords_cloud').find('.tagcloud').toggle(500);
81			if($('.sidebar-site .widget.widget_keywords_cloud').find('.collapse-widget-icon').hasClass('fa-chevron-right')){
82				$('.sidebar-site .widget.widget_keywords_cloud').find('.collapse-widget-icon').removeClass('fa-chevron-right');
83				$('.sidebar-site .widget.widget_keywords_cloud').find('.collapse-widget-icon').addClass('fa-chevron-down');
84			}
85			else{
86				$('.sidebar-site .widget.widget_keywords_cloud').find('.collapse-widget-icon').removeClass('fa-chevron-down');
87				$('.sidebar-site .widget.widget_keywords_cloud').find('.collapse-widget-icon').addClass('fa-chevron-right');
88			}
89		}
90	});
91
92	$('.widget.widget_indexers_widget').find('.widget-title').click(function(){
93		var width = $( window ).width();
94		if(width <= 991){
95			$('.widget.widget_indexers_widget').find('.list-indexers').toggle(500);
96			if($('.widget.widget_indexers_widget').find('.collapse-widget-icon').hasClass('fa-chevron-right')){
97				$('.widget.widget_indexers_widget').find('.collapse-widget-icon').removeClass('fa-chevron-right');
98				$('.widget.widget_indexers_widget').find('.collapse-widget-icon').addClass('fa-chevron-down');
99			}
100			else{
101				$('.widget.widget_indexers_widget').find('.collapse-widget-icon').removeClass('fa-chevron-down');
102				$('.widget.widget_indexers_widget').find('.collapse-widget-icon').addClass('fa-chevron-right');
103			}
104		}
105	});
106
107	$('#comments.comments-area').find('.comment-reply-title').click(function(){
108		var width = $( window ).width();
109		var parent = $(this).parent().parent();
110
111		if(width <= 991){
112			$(parent).find('.comment-form').toggle(500);
113			$(parent).find('.comment-list').toggle(500);
114			$(parent).find('.comments-title').toggle(500);
115			if($(parent).find('.collapse-widget-icon').hasClass('fa-chevron-right')){
116				$(parent).find('.collapse-widget-icon').removeClass('fa-chevron-right');
117				$(parent).find('.collapse-widget-icon').addClass('fa-chevron-down');
118			}
119			else{
120				$(parent).find('.collapse-widget-icon').removeClass('fa-chevron-down');
121				$(parent).find('.collapse-widget-icon').addClass('fa-chevron-right');
122			}
123		}
124	});	
125
126	$('.widget.widget_categories_widget').find('.widget-title').click(function(){
127		var width = $( window ).width();
128		if(width <= 991){
129			$('.widget.widget_categories_widget').find('ul').toggle(500);
130			if($('.widget.widget_categories_widget').find('.collapse-widget-icon').hasClass('fa-chevron-right')){
131				$('.widget.widget_categories_widget').find('.collapse-widget-icon').removeClass('fa-chevron-right');
132				$('.widget.widget_categories_widget').find('.collapse-widget-icon').addClass('fa-chevron-down');
133			}
134			else{
135				$('.widget.widget_categories_widget').find('.collapse-widget-icon').removeClass('fa-chevron-down');
136				$('.widget.widget_categories_widget').find('.collapse-widget-icon').addClass('fa-chevron-right');
137			}
138		}
139	});
140
141	//change icon collapse Site Map
142	$('#footer-site .btn-plus').click(function(){
143		if($(this).find('.fa').hasClass('fa-chevron-right')){
144			$(this).find('.fa').removeClass('fa-chevron-right');
145			$(this).find('.fa').addClass('fa-chevron-down');
146		}
147		else{
148			$(this).find('.fa').removeClass('fa-chevron-down');
149			$(this).find('.fa').addClass('fa-chevron-right');
150		}
151	});
152
153	$('.copy-this').click(function(){
154		$(this).selectText();
155	});
156});
157
158jQuery.fn.selectText = function(){
159	var doc = document;
160	var element = this[0];
161	if (doc.body.createTextRange) {
162	   	var range = document.body.createTextRange();
163	   	range.moveToElementText(element);
164	   	range.select();
165	} else if (window.getSelection) {
166	   	var selection = window.getSelection();        
167	   	var range = document.createRange();
168	   	range.selectNodeContents(element);
169	   	selection.removeAllRanges();
170	   	selection.addRange(range);
171	}
172};
173
174function verifyMenuMobile(){
175	if ($(document).scrollTop() < 10) {
176    	$('.mh-head').addClass('mh-in-top');
177    }
178    else {
179    	$('.mh-head').removeClass('mh-in-top');
180    }
181}
182
183function verifyWidthForWidgets(){
184	var width = $( window ).width();
185	if(width <= 991){
186		if(! $('.widget.widget_most_viewed_articles_widget_widget').find('ul').hasClass('collapsed-mobile') ){
187	    	$('.widget.widget_most_viewed_articles_widget_widget').find('ul').hide();
188	    	$('.widget.widget_most_viewed_articles_widget_widget').find('ul').addClass('collapsed-mobile');
189
190	    	$('.widget.widget_most_viewed_articles_widget_widget').find('.widget-title').append('<i class="collapse-widget-icon fa fa-chevron-right" aria-hidden="true"></i>');
191	    }
192
193		if(! $('.widgets-article-page .all-widget-article').find('.grid-widget-article').hasClass('collapsed-mobile') ){
194			$('.widgets-article-page .all-widget-article').find('.grid-widget-article').hide();
195			$('.widgets-article-page .all-widget-article').find('.grid-widget-article').addClass('collapsed-mobile');
196
197			$('.widgets-article-page .all-widget-article').find('.title-widgets-article').append('<i class="collapse-widget-icon fa fa-chevron-right" aria-hidden="true"></i>');
198		}
199
200		if(! $('#comments.comments-area').find('.comment-form').hasClass('collapsed-mobile') ){
201			$('#comments.comments-area').find('.comment-form').hide();
202			$('#comments.comments-area').find('.comment-list').hide();
203			$('#comments.comments-area').find('.comments-title').hide();
204			$('#comments.comments-area').find('.comment-form').addClass('collapsed-mobile');
205
206			$('#comments.comments-area').find('.comment-reply-title').append('<i class="collapse-widget-icon fa fa-chevron-right" aria-hidden="true"></i>');
207		}		   
208
209		if(! $('.sidebar-site .widget.widget_keywords_cloud').find('.tagcloud').hasClass('collapsed-mobile') ){
210    		$('.sidebar-site .widget.widget_keywords_cloud').find('.tagcloud').hide();
211    		$('.sidebar-site .widget.widget_keywords_cloud').find('.tagcloud').addClass('collapsed-mobile');
212
213    		$('.sidebar-site .widget.widget_keywords_cloud').find('.widget-title').append('<i class="collapse-widget-icon fa fa-chevron-right" aria-hidden="true"></i>');
214    	}
215
216    	if(! $('.widget.widget_indexers_widget').find('.list-indexers').hasClass('collapsed-mobile') ){
217    		$('.widget.widget_indexers_widget').find('.list-indexers').hide();
218    		$('.widget.widget_indexers_widget').find('.list-indexers').addClass('collapsed-mobile');
219
220    		$('.widget.widget_indexers_widget').find('.widget-title').append('<i class="collapse-widget-icon fa fa-chevron-right" aria-hidden="true"></i>');
221    	}
222
223    	if(! $('.widget.widget_categories_widget').find('ul').hasClass('collapsed-mobile') ){
224    		$('.widget.widget_categories_widget').find('ul').hide();
225	    	$('.widget.widget_categories_widget').find('ul').addClass('collapsed-mobile');
226
227	    	$('.widget.widget_categories_widget').find('.widget-title').append('<i class="collapse-widget-icon fa fa-chevron-right" aria-hidden="true"></i>');	    	
228    	}
229    }
230    else{
231    	$('.widget.widget_most_viewed_articles_widget_widget').find('ul').show();
232    	$('.sidebar-site .widget.widget_keywords_cloud').find('.tagcloud').show();
233    	$('.widget.widget_indexers_widget').find('.list-indexers').show();
234    	$('.widget.widget_categories_widget').find('ul').show();
235
236    	$('.widget.widget_most_viewed_articles_widget_widget').find('ul').removeClass('collapsed-mobile');
237		$('.sidebar-site .widget.widget_keywords_cloud').find('.tagcloud').removeClass('collapsed-mobile');
238		$('.widget.widget_indexers_widget').find('.list-indexers').removeClass('collapsed-mobile');
239		$('.widget.widget_categories_widget').find('ul').removeClass('collapsed-mobile');
240
241		$('.widget').find('.collapse-widget-icon').remove();
242    }
243}
244
245$(window).scroll(function(){
246	var width = $( window ).width();
247 
248	if(width >= 991){
249
250		var size_width = $('#masthead .custom-logo').attr('width');
251		var size_height = $('#masthead .custom-logo').attr('height');
252
253		var width_reduz = size_width - (size_width * 0.3);
254		var height_reduz = size_height - (size_height * 0.3);
255
256
257	  if($(document).scrollTop() > 0){	
258		   $('#masthead').addClass('menu-minimized');
259		   $('#masthead .img-header-abn').hide();
260		   $('#masthead .grid-magazine').hide();
261		   $('#masthead .custom-logo').css('width', '298px');
262		   $('#masthead .custom-logo').css('height', 'auto');
263		}
264		else
265		{	
266			$('#masthead').removeClass('menu-minimized');
267		    $('#masthead .img-header-abn').show();
268		    $('#masthead .grid-magazine').show();
269		    $('#masthead .custom-logo').css('width', '427px');
270		    $('#masthead .custom-logo').css('height', 'auto');	
271		}
272	}else{
273
274		if($(document).scrollTop() > 0){ 
275		    $('#masthead .custom-logo').css('width', '45%');
276		    $('#masthead .custom-logo').css('height', 'auto');	
277		}else{
278
279		    $('#masthead .custom-logo').css('width', '100%');
280		    $('#masthead .custom-logo').css('height', 'auto');	
281		}
282	}
283
284	if(width >= 769 && width <= 991){
285
286	  if($(document).scrollTop() > 0)
287		{
288		 	$('.content-header #header-right-sidebar').addClass('header-submit-content');
289		}else{
290
291			$('.content-header #header-right-sidebar').removeClass('header-submit-content');
292		}
293	}
294
295});
296
297function verify_fixed_menu(){
298	var width = $( window ).width();
299	if(width <= 991){
300		//MOBILE
301		$('#masthead').removeClass('fixed-top');
302		
303	}else{
304		//DESKTOP
305		$('#masthead').addClass('fixed-top');
306	}
307}

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.