⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
local
/
softaculous
/
enduser
/
themes
/
default
/
js
/
View File Name :
dock.js
////////////////////////////////////////////////////////////// // Dock.js // By Alons // Please Read the Terms of use at http://www.softaculous.com // (c)Softaculous Inc. ////////////////////////////////////////////////////////////// function dock(id){ this.speed = 10; this.pace = 10; this.min = 40; this.max = 80; var img, sizes = []; if(typeof(id) != 'string'){ id = 'dock'; } this.init = function(){ var self = this; this.dock = $_(id); sizes.def = Math.floor((this.max-this.min)/3); for(i=0; i<4; i++){ sizes[i] = 1*this.min + i*sizes.def; } //Get the images img = this.dock.getElementsByTagName('img'); //Set the width this.dock.style.height = sizes[3]+"px"; //Set the height this.dock.style.width = (sizes[0]*(img.length-1))+"px"; for (i=0; i<img.length; i++) { img[i].now = { left : 0, top : 0, size : sizes[0] }; img[i].target = { left : 0, top : 0, size : sizes[0] }; //Mouseover Event img[i].onmouseover = function(e) { e = window.event ? event : e; e = e.srcElement ? e.srcElement : e.target; for(i=0; i<img.length; i++){ if(e==img[i]){ self.process(i); break; } } tmpxy = findelpos(self.dock); tmpid = self.dock.id+'_titler'; try{ $_(tmpid).innerHTML = getAttributeByName(e, 'tooltip'); $_(tmpid).style.top = (tmpxy[1] + self.max)+'px'; tmpxy = findelpos(e); tx = tmpxy[0]; tx = tx - ($_(tmpid).offsetWidth/2); if((screen.width - 40) < (tx + $_(tmpid).offsetWidth)){ tx = (screen.width - 40) - $_(tmpid).offsetWidth - 10; } $_(tmpid).style.left = tx+'px'; showel(tmpid); }catch(ee){ } }; //Mouseout Event img[i].onmouseout = function(){ self.process(-1); try{ hideel(self.dock.id+'_titler'); }catch(ee){ } }; } //Process this.process(-1); var process = function(){ self.dockify(); }; setTimeout(process, this.speed); }; this.dockify = function(){ var self = this; for (i=0; i<img.length; i++){ img[i].now.left = ((this.pace-1)*img[i].now.left+img[i].target.left)/this.pace; img[i].style.left = Math.floor(img[i].now.left)+'px'; img[i].now.top = ((this.pace-1)*img[i].now.top+img[i].target.top)/this.pace; img[i].style.top = Math.floor(img[i].now.top)+'px'; img[i].now.size = ((this.pace-1)*img[i].now.size+img[i].target.size)/this.pace; img[i].style.width = Math.floor(img[i].now.size)+'px'; img[i].style.height = Math.floor(img[i].now.size)+'px'; } var process = function(){ self.dockify(); }; setTimeout(process ,this.speed); }; this.process = function(m){ for(i=0; i<img.length; i++){ img[i].target.size = sizes[0]; for(j=0; j<sizes.length-1; j++){ if(m>-1 && m<img.length && Math.abs(m-i)==j){ img[i].target.size = sizes[sizes.length-1-j]; } } img[i].target.top = sizes[3] - img[i].target.size; } var n = m > 2 ? 2 : m; if(n > -1){ img[0].target.left = -(1/2)*(sizes[0]+ sizes.def *(n*(4-(1/2)*n)+3)); }else{ img[0].target.left = 0; } for(i=1; i<img.length; i++){ img[i].target.left = img[i-1].target.left + img[i-1].target.size; } }; };