HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/neoblako.ru/wp-content/themes/blocksy/static/js/frontend/social-buttons.js
import $script from 'scriptjs'

export const mount = (el, { event }) => {
	if (el.dataset.network === 'pinterest') {
		event.preventDefault()
		if (window.PinUtils) {
			window.PinUtils.pinAny()
		} else {
			$script(
				'https://assets.pinterest.com/js/pinit.js',

				() => {
					// $log.info('Pinterest script loaded.')

					setTimeout(() => {
						window.PinUtils.pinAny()
					}, 300)
				}
			)
		}

		return
	}

	event.preventDefault()

	const url = el.href
	const title = ''
	const w = 600
	const h = 500

	// PopupCenter(el.querySelector('a').href, '', 600, 500)
	// Fixes dual-screen position
	// Most browsers      Firefox
	var dualScreenLeft =
		window.screenLeft != undefined ? window.screenLeft : screen.left
	var dualScreenTop =
		window.screenTop != undefined ? window.screenTop : screen.top

	var width = window.innerWidth
		? window.innerWidth
		: document.documentElement.clientWidth
		? document.documentElement.clientWidth
		: screen.width
	var height = window.innerHeight
		? window.innerHeight
		: document.documentElement.clientHeight
		? document.documentElement.clientHeight
		: screen.height

	var left = width / 2 - w / 2 + dualScreenLeft
	var top = height / 2 - h / 2 + dualScreenTop

	var newWindow = window.open(
		url,
		title,
		'scrollbars=yes, width=' +
			w +
			', height=' +
			h +
			', top=' +
			top +
			', left=' +
			left
	)

	// Puts focus on the newWindow
	if (window.focus) {
		newWindow.focus()
	}
}