PageSourceSearch

http://www.britishbasketballleague.com/embed/allstarvoting.js

js britishbasketballleague.com collected 2026-10-09 05:09:47 UTC 4,046 bytes, 105 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(function(){
11	// fetch current script tag that import this script
12	const script = document.currentScript;
13	var fs_league_id = 4;
14	var fs_league = script.dataset.league;
15	var fs_frame_id = script.dataset.id;
16	var fe_embed_width = '100%';
17	var fs_frame_title = 'AllstarVote';
18	var fs_frame_name = 'AllstarVote Embed';
19	var fe_http = 'https://';
20	var fe_domain = 'allstarvote.britishbasketballleague.com/';
21	if(fs_league == 'wbbl') {
22		fe_domain = 'allstarvote.fastedge.ai/';
23		fs_league_id = 10
24	}
25	var fe_origin = fe_http + fe_domain;
26	let iframeSrcUrl = fe_origin +'mvpvote?leagueId='+fs_league_id+'&'+fs_get_query_params();
27	console.log(iframeSrcUrl);
28	
29	var fe_frame_code = '<div style="width:'+fe_embed_width +';position: relative;max-width: 100%;">';
30	fe_frame_code += '<iframe title="'+fs_frame_title +'" name="'+fs_frame_name +'" allowfullscreen="allowfullscreen" scrolling="no" id="fs_embedframe_'+fs_league+'_'+ fs_league_id +'" src="'+ iframeSrcUrl +'" frameborder="0" style="width: 100%; max-width: 100%; height:0px;">Your browser does not support iframe</iframe>';
31	fe_frame_code += '</div>';
32	
33	var fs_node = document.createElement("div");
34	fs_node.innerHTML = fe_frame_code;
35	
36	var fs_script_element = document.getElementById(fs_frame_id);
37	fs_script_element.appendChild(fs_node);
38	
39	function fs_in_iframe() {
40		try {
41			return window.self !== window.top;
42		} catch (e) {
43			return true;
44		}
45	}
46	
47	function fs_get_query_params() {
48		var urlParams = new URLSearchParams(window.location.search);
49		var params = {};
50		for (var [key, value] of urlParams.entries()) { params[key] = value; }
51		return Object.keys(params).map(function(key) {
52			return key + '=' + encodeURIComponent(params[key]); 
53		}).join('&');
54	}
55	
56	var fs_get_distance = function(elem) {
57		var location = 0;
58		if (elem != null && elem.offsetParent) {
59			do {
60				location += elem.offsetTop;
61				elem = elem.offsetParent;
62			} while (elem);
63		}
64		return location >= 0 ? location : 0;
65	};
66
67	document.addEventListener('scroll', function(event) {
68		var elem = document.querySelector('#fs_embedframe_' + fs_league + '_' + fs_league_id);
69		if(elem.contentWindow !== null) {
70			if (fs_in_iframe()) {
71				var top = 0;
72				var location = 0;
73			} else {
74				var doc = document.documentElement, body = document.body;
75				var top = (doc && doc.scrollTop || body && body.scrollTop || 0);
76				var location = fs_get_distance(elem);
77			}
78			var json = {
79				"parent_top": top,
80				"parent_position": location
81			}; 
82			elem.contentWindow.postMessage(json, "*");
83		}
84	});
85
86	var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
87	var eventer = window[eventMethod];
88	var messageEvent = eventMethod == "attachEvent" ? "onmessage" : "message";
89	eventer(messageEvent, function(e) {
90		//if (e.origin == 'https://allstarvote.britishbasketballleague.com' || e.origin == 'https://allstarvote.fastedge.ai') {
91			var obj = e.data;
92			if (obj !== null && typeof obj === 'object') {
93				if (("height" in obj) && ("tagId" in obj) && fs_frame_id == obj.tagId) {
94					var h = obj.height;
95					var frame_id = 'fs_embedframe_' + fs_league + '_' + fs_league_id;
96					var el = document.getElementById(frame_id);
97					if (typeof(el) != 'undefined' && el != null) {
98						el.style.setProperty('height', h, 'important');
99					}
100				}
101			}
102		//}
103	}, false);
104})()
105}

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.