WS_OK_7.4.33 HEX
HEX
Server: nginx/1.21.4
System: Linux v12674 6.8.0-85-generic #85-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 18 15:26:59 UTC 2025 x86_64
User: endtheignorance (1014)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: /storage/v12674/lcagreenbay/public_html/wp-content/plugins/us-wi-map/map-interact.js
// Quick feature detection
function isTouchEnabled() {
 	return (('ontouchstart' in window)
      	|| (navigator.MaxTouchPoints > 0)
      	|| (navigator.msMaxTouchPoints > 0));
}
jQuery(function(){
	jQuery("path[id^=\"us_wi_\"]").each(function (i, e) {
		addEvent( jQuery(e).attr('id') );
	});
})
function addEvent(id,relationId){
	var _obj = jQuery('#'+id);
	var _Textobj = jQuery('#'+id+','+'#'+us_wi_config[id]['visnames']);
	var _h = jQuery('#map').height();

	jQuery('#'+['visnames']).attr({'fill':us_wi_config['default']['visnames']});

		_obj.attr({'fill':us_wi_config[id]['upclr'],'stroke':us_wi_config['default']['borderclr']});
		_Textobj.attr({'cursor':'default'});
		if(us_wi_config[id]['enbl'] == true){
			if (isTouchEnabled()) {
				_Textobj.on('touchstart', function(e){
					var touch = e.originalEvent.touches[0];
					var x=touch.pageX-10, y=touch.pageY+(-15);
					var maptipw=jQuery('#tipuswi').outerWidth(), maptiph=jQuery('#tipuswi').outerHeight(), 
					x=(x+maptipw>jQuery(document).scrollLeft()+jQuery(window).width())? x-maptipw-(20*2) : x
					y=(y+maptiph>jQuery(document).scrollTop()+jQuery(window).height())? jQuery(document).scrollTop()+jQuery(window).height()-maptiph-10 : y
					if(us_wi_config[id]['targt'] != 'none'){
						jQuery('#'+id).css({'fill':us_wi_config[id]['dwnclr']});
					}
					jQuery('#tipuswi').show().html(us_wi_config[id]['hover']);
					jQuery('#tipuswi').css({left:x, top:y})
				})
				_Textobj.on('touchend', function(){
					jQuery('#'+id).css({'fill':us_wi_config[id]['upclr']});
					if(us_wi_config[id]['targt'] == '_blank'){
						window.open(us_wi_config[id]['url']);	
					}else if(us_wi_config[id]['targt'] == '_self'){
						window.parent.location.href=us_wi_config[id]['url'];
					}
					jQuery('#tipuswi').hide();
				})
			}
			_Textobj.attr({'cursor':'pointer'});
			_Textobj.hover(function(){
				//moving in/out effect
				jQuery('#tipuswi').show().html(us_wi_config[id]['hover']);
				_obj.css({'fill':us_wi_config[id]['ovrclr']})
			},function(){
				jQuery('#tipuswi').hide();
				jQuery('#'+id).css({'fill':us_wi_config[id]['upclr']});
			})
			if(us_wi_config[id]['targt'] != 'none'){
				//clicking effect
				_Textobj.mousedown(function(){
					jQuery('#'+id).css({'fill':us_wi_config[id]['dwnclr']});
				})
			}
			_Textobj.mouseup(function(){
				jQuery('#'+id).css({'fill':us_wi_config[id]['ovrclr']});
				if(us_wi_config[id]['targt'] == '_blank'){
					window.open(us_wi_config[id]['url']);	
				}else if(us_wi_config[id]['targt'] == '_self'){
					window.parent.location.href=us_wi_config[id]['url'];
				}
			})
			_Textobj.mousemove(function(e){
				var x=e.pageX+10, y=e.pageY+15;
				var maptipw=jQuery('#tipuswi').outerWidth(), maptiph=jQuery('#tipuswi').outerHeight(), 
				x=(x+maptipw>jQuery(document).scrollLeft()+jQuery(window).width())? x-maptipw-(20*2) : x
				y=(y+maptiph>jQuery(document).scrollTop()+jQuery(window).height())? jQuery(document).scrollTop()+jQuery(window).height()-maptiph-10 : y
				jQuery('#tipuswi').css({left:x, top:y})
			})
		}	
}