PageSourceSearch

http://www.britishbasketballleague.com/wp-content/plugins/aggro/themes/3/script_ver-5.0.2.js

js britishbasketballleague.com collected 2026-10-09 05:09:45 UTC 10,706 bytes, 268 lines download raw bytes

1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
2let window = _____WB$wombat$assign$function_____("window");
3let self = _____WB$wombat$assign$function_____("self");
4let document = _____WB$wombat$assign$function_____("document");
5let location = _____WB$wombat$assign$function_____("location");
6let top = _____WB$wombat$assign$function_____("top");
7let parent = _____WB$wombat$assign$function_____("parent");
8let frames = _____WB$wombat$assign$function_____("frames");
9let opens = _____WB$wombat$assign$function_____("opens");
10//-- Angular JS --
11	var aggroApp = angular.module('aggroApp', ['wu.masonry']) //,'infinite-scroll'
12	.config( [
13	    '$compileProvider',
14	    function( $compileProvider )
15	    {   
16	        $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|javascript):/);
17	        // Angular before v1.2 uses $compileProvider.urlSanitizationWhitelist(...)
18	    }
19	])
20	.filter('filterByAccounts', function () 
21	{
22		return function (items, accounts, isBlocked) {
23			if(!jQuery.isEmptyObject(accounts)){
24				 var isInclude = false;
25				 var arrayToReturn = [];
26
27				 for (var i = 0; i < items.length; i++) {
28				 	if(accounts.hasOwnProperty(items[i].source)){
29				 		isInclude = false;			 		
30					 	if (isBlocked && items[i].blocked == "1") 
31					 		isInclude = false;
32					 	else{
33					 		switch (items[i].source)
34					 		{
35						 		case "twitter": 
36						 			if(accounts['retweets'] == "1"){
37						 				if (items[i].channel.toLowerCase == accounts['twitter'].toLowerCase) isInclude = true;
38						 			} else{
39						 				if (items[i].screen_name.toLowerCase == accounts['twitter'].toLowerCase) isInclude = true;
40						 			}
41						 			break;
42						 		case "hashtag": 
43						 			if(accounts['hashtype'] != "photo"){
44						 				if (items[i].channel.toLowerCase == accounts['hashtag'].toLowerCase) isInclude = true;
45						 			} else{
46						 				if (items[i].channel.toLowerCase == accounts['hashtag'].toLowerCase && item[i].image != "") isInclude = true;
47						 			}
48						 			break;
49					            case "instagram" : 
50					            	if (items[i].screen_name.toLowerCase == accounts['instagram'].toLowerCase) isInclude = true;
51					            	break;
52					            case "youtube": 
53					            	if (items[i].screen_name.toLowerCase == accounts['youtube'].toLowerCase) isInclude = true;
54					            	break;
55					            case "youtube-playlist": 
56					            	if (items[i].screen_name.toLowerCase == accounts['youtube_playlist'].toLowerCase) isInclude = true;
57					            	break;
58					            case "facebook": 
59					            	if (items[i].screen_name.toLowerCase == accounts['facebook'].toLowerCase) isInclude = true;
60					            	break;
61					            case "googleplus": 
62					            	if (items[i].screen_name.toLowerCase == accounts['googleplus'].toLowerCase) isInclude = true;
63					            	break;
64				            	case "rss":
65				            		if (items[i].channel.toLowerCase == accounts['rss'].toLowerCase) isInclude = true;
66				            		break;
67			            		case "nothing": isInclude = true; break;
68					            default: isInclude = false; break;
69					 		}
70					 	}				 	
71					 	if (isInclude) arrayToReturn.push(items[i]);
72					} 
73				}
74				return arrayToReturn;
75			}
76			else
77				return items;
78		};
79	})
80	.filter('buildSocialCard', function()
81	{
82		return function(social, image)
83		{
84			var strCard = "";
85			switch(social.toLowerCase()){
86				case "twitter": case "hashtag": strCard = "twCard twitter-" + (image !="" ? "photo" : "text"); break;
87	            case "instagram" : strCard = "igCard instagram-post"; break;
88	            case "youtube": strCard = "ytCard youtube-video"; break;
89	            case "youtube-playlist": strCard = "ytplCard youtube-video youtube-playlist"; break;
90	            case "facebook": 
91	            	strCard = "fbCard facebook-" + (image !="" ? "photo" : "text") + (image.indexOf('130') > 0 ? " facebook-thumb":"");             	
92	            	break;
93	            case "googleplus": strCard = "gpCard googleplus-" + (image !="" ? "photo" : "text"); break;
94	            case "rss": strCard = "rssCard rss-item"; break;
95	            default: strCard = social.toLowerCase(); break;
96			}
97			return strCard;
98		}
99	})
100	.filter('buildProfileURL', function()
101	{
102		return function(social, account)
103		{
104			var strUrl = "";
105	    	switch (social.toLowerCase()) {
106	            case "twitter": case "hashtag": strUrl = "https://twitter.com/"; break;
107	            case "instagram" : strUrl = "https://instagram.com/"; break;
108	            case "youtube": strUrl = "https://www.youtube.com/user/"; break;
109	            case "youtube-playlist": strUrl = "https://www.youtube.com/playlist?list="; break;
110	            case "facebook": strUrl = "https://www.facebook.com/"; break;
111	            case "googleplus": strUrl = "https://plus.google.com/"; break;	            
112	            default: strUrl = ""; break;
113	        }
114	    	return strUrl + account;
115		}
116	})
117	.filter('buildItemURL', function()
118	{
119		return function(social, account, aggroid, link, isLightBox)
120		{
121			var strUrl = "";
122	    	switch (social.toLowerCase()) {
123	            case "twitter": case "hashtag": strUrl = "https://twitter.com/" + account + "/status/" + aggroid + "/"; break;	            
124	            case "youtube": case "youtube-playlist": strUrl = "https://www.youtube.com//watch?v=" + aggroid; break;	            
125	            default: strUrl = link; break;
126	        }
127	    	return isLightBox ? "javascript:lightbox(null, '" + document.location.origin + "/afl-queensland/aggro-item/" + aggroid + "/');" : strUrl;
128		}
129	})
130	.filter('buildBlockURL', function()
131	{
132		return function(aggroid, uid, blocked)
133		{
134	    	return  document.location.origin + "/afl-queensland/aggro-item/" + aggroid + "/?aggro_" + (blocked =="1" ? "un" : "") + "block=" + uid;
135		}
136	})
137	.filter('buildHTMLContent', function($sce)
138	{
139		return function(stringToParse, censor)
140		{
141			var strHTML = stringToParse;
142			angular.forEach(censor, function(value) {
143				value = value.replace(new RegExp("^\/(.*?)\/i$"),"$1");
144				strHTML = strHTML.replace(new RegExp(value, "gi"), "$#%@!");
145			});
146			return $sce.trustAsHtml(strHTML);
147		}
148	})
149	.filter('buildTwitterTime', function()
150	{
151		return function(stringToParse)
152		{
153			var dateMsec = new Date().getTime() + ((new Date().getTimezoneOffset())*60*1000);
154	    	var dateComp = new Date(stringToParse).getTime();
155	    	// Get the difference in milliseconds.
156			var interval = dateMsec - dateComp;
157			var msecPerMinute = 1000 * 60;
158			var msecPerHour = msecPerMinute * 60;
159			var msecPerDay = msecPerHour * 24;
160			
161			if ( $.isNumeric( interval ) && interval > 0 ) {
162				if ( interval < 3000 )
163	                return "right now";
164	            if ( interval < msecPerMinute )
165	                return Math.round( interval / 1000 ) + " seconds ago";
166	            if ( interval < msecPerMinute * 2 )
167	                return "about 1 minute ago";
168	            if ( interval < msecPerHour )
169	                return Math.round( interval / msecPerMinute ) + " minutes ago";
170	            if ( interval < msecPerHour * 2 )
171	                return "about 1 hour ago";
172	            if ( interval < msecPerDay )
173	                return Math.round( interval / msecPerHour ) + " hours ago";
174	            if ( interval > msecPerDay && interval < msecPerDay * 2 )
175	                return "yesterday";
176	            if ( interval < msecPerDay * 365 )
177	                return Math.round( interval / msecPerDay ) + " days ago";
178	            return "over a year ago";
179			}
180		}
181	})
182	.filter('startFrom', function() {
183	    return function(input, start) {
184	        start = +start; //parse to int
185	        return input.slice(start);
186	    }
187	})
188	.controller('socialCtrl', function ($scope, $timeout, $http) { //$interval
189
190		$scope.init = function(social_accounts, isBlocked, isScroll, isLightBox, isBannedWords)
191		{
192		//This function is sort of private constructor for controller
193			$scope.accounts = social_accounts;
194			$scope.pageSize = social_accounts['size'];
195			$scope.isAdmin  = !isBlocked;
196			$scope.isScroll		= isScroll;
197			$scope.isLightBox	= isLightBox;
198			$scope.isBannedWords= isBannedWords;
199			$scope.currentPage  = 1;
200			$scope.censor = [];
201			$scope.isBusy = true;
202		};
203
204		$scope.numberOfPages=function(){
205	    	return Math.ceil($scope.aggro.length/$scope.pageSize);                
206		};
207		$scope.nextPage = function(){
208			$scope.isBusy = true;
209	    	$scope.currentPage=$scope.currentPage+1;
210	    	$timeout(function() { $scope.isBusy = false; }, 3000);
211			return false;
212		};
213		$scope.disableLoad = function(){
214			return $scope.currentPage >= $scope.aggro.length/$scope.pageSize - 1
215		};
216		$scope.blockpost = function(index, post){   		
217			$http({
218	           method: "post",
219	           url: document.location.origin + "/afl-queensland/aggro-item/" + post.aggroID + "/?aggro_" + (post.blocked =="1" ? "un" : "") + "block=" + post.UID,
220	           //data: $scope.aggro,
221	           headers: { 'Content-Type': 'application/json; charset=utf-8' }
222			}).then(function successCallback(response) {
223			    // this callback will be called asynchronously when the response is available
224			    if (post.blocked == "1"){
225					unblockpost(post.aggroID, post.UID);
226					post.blocked = null;
227				} else {
228					blockpost(post.aggroid, post.UID);
229					post.blocked = "1";
230				}
231				$scope.aggro[index] = post;
232			    console.log(post.blocked);
233			}, function errorCallback(response) {
234			    // called asynchronously if an error occurs or server returns response with an error status.
235			    console.log("Error: " +  response);
236			});			   
237			return false;
238		};
239		//$http.get('/aggro.json')
240		//read aggro json
241		$http.get('/afl-queensland/aggro.json') //, { cache: true}
242			.success(function (data) {
243				$scope.aggro = data;
244				$scope.isBusy = false;
245		});
246
247		if($scope.isBannedWords){
248			$http.get('/afl-queensland/censor.json', { cache: true})
249				.success(function (data) {
250					$scope.censor = data;
251			});				
252		}
253	})
254	.directive('scrollTrigger', function($window) {
255	    return {
256	        link : function(scope, element, attrs) {
257	            var offset = parseInt(attrs.threshold) || 0;
258	            var e = jQuery(element[0]);
259	            var doc = jQuery(document);
260	            angular.element(document).bind('scroll', function() {
261	                if (doc.scrollTop() + $window.innerHeight + offset > e.offset().top) {
262	                    scope.$apply(attrs.scrollTrigger);
263	                }
264	            });
265	        }
266	    };
267	});
268}

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.