Warning: chmod(): Operation not permitted in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8
[0] in function chmod in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8
[1] in function include_once in /var/www/hopeinstoughton_www/wp-settings.php on line 560
[2] in function require_once in /var/www/hopeinstoughton_www/wp-config.php on line 85
[3] in function require_once in /var/www/hopeinstoughton_www/wp-load.php on line 50
[4] in function require_once in /var/www/hopeinstoughton_www/wp-blog-header.php on line 13
[5] in function require in /var/www/hopeinstoughton_www/index.php on line 17
403WebShell
403Webshell
Server IP : 94.177.8.99  /  Your IP : 216.73.217.165
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux aries 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/theyoungdesigners_com/modules/contextMenu/static/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/theyoungdesigners_com/modules/contextMenu/static/contextMenu.js
var $ = jQuery.noConflict();

function ContextMenu() {
	let _this = this;
	let subItems;

	function _getData($target) {
		let $k = $target.closest('li.jstree-node');
		let temp = $k.data('data');
		if (typeof temp != 'undefined') return temp;
		temp = $target[0];
		return temp.id;
	}

	function _attachContextMenu(selector) {
		$.contextMenu({
			selector: selector,
			trigger: 'none',
			reposition: false,
			build: function ($trigger, e) {
				return {
					callback: function (key, options) {
						if (typeof subItems[key] != 'undefined')  {
							if (subItems[key].click) {
								let fn = window[subItems[key].click];
								if (typeof fn == 'function') return fn(subItems[key]);
							} 
							if (subItems[key].href) {
								// do our special ajax to perform the selected popup item
								let className = subItems[key].className || '';
								className = ' ' + className + ' ';
								if (className.indexOf(' json ') > -1) {
									main.loadURL(subItems[key].href);
								} else if (className.indexOf(' ajax ') > -1) {
									history.pushState(null, null, subItems[key].href);
									main.loadURL(subItems[key].href);
								} else {
									window.location.href = subItems[key].href;
								}
							}
						}
					},
					items: subItems,
				};
			}
		});
	}

	_this.loadContextMenus = function ($parent) {
		let $context = $('.contextMenu', $parent);
		if ($context.length) {
			_attachContextMenu('.contextMenu');
		}
	}
	
	function contextClick(e, $context, $target) {
		let ajax = $context.attr('context');
		if (ajax === undefined) {
			let $container = $context.closest('*[context]');
			ajax = $container.attr('context');
		}
		if (ajax !== undefined) {      // only when 'ajax' attr present
			let sep = ajax.indexOf('?') > -1 ? '&' : '?';
			let info = _getData($target);
			if (info != '') {
				ajax += sep + 'src=' + info;
				sep = '&';
			}
			const date = new Date();
			const offsetMinutes = date.getTimezoneOffset();
			ajax += sep + 'ofs=' + offsetMinutes;
			sep = '&';
			// determine position within $context
			let p = $context.offset();
			ajax += sep + 'x=' + (e.pageX - p.left) + '&y=' + (e.pageY - p.top);
			sep = '&';
			
			// attach timezone delta
			_attachContextMenu($context);

			$.getJSON( ajax, function( data ) {
				subItems = data;
				$context.contextMenu({x: e.pageX, y: e.pageY});
			});
			e.preventDefault();
		}
	}

	$(document).on('loaded.template', function() {
		_this.loadContextMenus($(document));

	}).on('mouseup', '.contextMenu', function(e) {
		if (e.which != 3) return;
		let $context = $(this);
		let $target = $(e.target);
		contextClick(e, $context, $target);

	}).on('contextmenu', function(e) {
		let $target = $(e.target);
		let x = $target.closest('.contextMenu');
		if (x.length) {
			return false;	// disable browser context
		}

	}).on('loaded.datatables', function(event, table) {
		_this.loadContextMenus($(table));
		
	}).on('click', '.action-context2', function(e) {
		// left click for the context
		let $context = $(this);
		let $target = $(e.target);
		contextClick(e, $context, $target);
		e.preventDefault();
	});

}

contextmenu = new ContextMenu();

Youez - 2016 - github.com/yon3zu
LinuXploit