| Server IP : 38.190.208.107 / Your IP : 216.73.216.207 Web Server : nginx/1.28.1 System : Linux ht2026040333114 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64 User : root ( 0) PHP Version : 8.2.28 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv,eval,assert,passthru,system,exec,shell_exec,popen,proc_open MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/wp.2/wp-content/themes/blocksy/static/js/frontend/ |
Upload File : |
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
}
if (el.dataset.network === 'clipboard') {
event.preventDefault()
const text =
el.href.indexOf('wish_list_id') !== -1
? el.href
: window.location.href
const tooltip = el.querySelector('.ct-tooltip')
let initialText = ''
if (tooltip) {
initialText = tooltip.innerHTML
}
if (navigator.clipboard && window.isSecureContext) {
navigator.clipboard.writeText(text)
if (tooltip) {
tooltip.innerHTML = ct_localizations.clipboard_copied
}
} else {
const textArea = document.createElement('textarea')
textArea.value = text
// Move textarea out of the viewport so it's not visible
textArea.style.position = 'absolute'
textArea.style.left = '-999999px'
document.body.prepend(textArea)
textArea.select()
try {
document.execCommand('copy')
} catch (error) {
console.error(error)
if (tooltip) {
tooltip.innerHTML = ct_localizations.clipboard_failed
}
} finally {
textArea.remove()
if (tooltip) {
tooltip.innerHTML = ct_localizations.clipboard_copied
}
}
}
setTimeout(() => {
if (tooltip) {
tooltip.innerText = initialText
}
}, 2000)
return
}
if (el.hasClickListener) {
return
}
el.hasClickListener = true
el.addEventListener('click', (e) => {
e.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()
}
})
}