PageSourceSearch

https://www.senairs.org.br/sites/all/themes/fiergs3/js/custom/cour…/course--units--hide-with-classes.js?tkslu7

js senairs.org.br collected 2026-09-26 06:16:29 UTC 830 bytes, 23 lines download raw bytes

1
2(function ($, Drupal, window, document, undefined) {
3  Drupal.behaviors.courseUnitsHideWithClasses = {
4    attach: function(context, settings) {
5    	// This is a very weird and fast solution to hide units that have
6    	// open classes in the course page
7    	if($(".view-id-course__classes").length && $(".view-id-course__units").length){
8    		$(".class--unit").each(function(){
9    			console.log($(this).text().replace(/\s/g,''));
10    			var unitTitle = $(this).text().replace(/\s/g,'');
11    			$(".view-id-course__units").find(".course--unit").each(function(){
12    				console.log($(this).text().replace(/\s/g,''));
13    				if($(this).text().replace(/\s/g,'') == unitTitle){
14    					$(this).closest(".views-row").addClass("hide");
15    				}
16    			});
17    		});
18    	}
19    }
20  };
21
22
23})(jQuery, Drupal, this, this.document);

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.