Server IP : 1.179.227.78 / Your IP : 10.104.4.41 Web Server : Apache System : Linux afdc-mdu34 5.4.0-153-generic #170-Ubuntu SMP Fri Jun 16 13:43:31 UTC 2023 x86_64 User : www ( 1001) PHP Version : 7.4.30 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 MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/afdc-mdu34.rtarf.mi.th/mdu34/templates/beez3/javascript/ |
Upload File : |
/*global window, localStorage, fontSizeTitle, bigger, reset, smaller, biggerTitle, resetTitle, smallerTitle, Cookie */ var prefsLoaded = false; var defaultFontSize = 100; var currentFontSize = defaultFontSize; Object.append(Browser.Features, { localstorage: (function() { return ('localStorage' in window) && window.localStorage !== null; })() }); function setFontSize(fontSize) { document.body.style.fontSize = fontSize + '%'; } function changeFontSize(sizeDifference) { currentFontSize = parseInt(currentFontSize, 10) + parseInt(sizeDifference * 5, 10); if (currentFontSize > 180) { currentFontSize = 180; } else if (currentFontSize < 60) { currentFontSize = 60; } setFontSize(currentFontSize); } function revertStyles() { currentFontSize = defaultFontSize; changeFontSize(0); } function writeFontSize(value) { if (Browser.Features.localstorage) { localStorage.fontSize = value; } else { Cookie.write("fontSize", value, {duration: 180}); } } function readFontSize() { if (Browser.Features.localstorage) { return localStorage.fontSize; } else { return Cookie.read("fontSize"); } } function setUserOptions() { if (!prefsLoaded) { var size = readFontSize(); currentFontSize = size ? size : defaultFontSize; setFontSize(currentFontSize); prefsLoaded = true; } } function addControls() { var container = document.id('fontsize'); var content = '<h3>'+ fontSizeTitle +'</h3><p><a title="'+ biggerTitle +'" href="#" onclick="changeFontSize(2); return false">'+ bigger +'</a><span class="unseen">.</span><a href="#" title="'+resetTitle+'" onclick="revertStyles(); return false">'+ reset +'</a><span class="unseen">.</span><a href="#" title="'+ smallerTitle +'" onclick="changeFontSize(-2); return false">'+ smaller +'</a></p>'; container.set('html', content); } function saveSettings() { writeFontSize(currentFontSize); } window.addEvent('domready', function () { smaller = Joomla.JText._('TPL_BEEZ3_SMALLER'); fontSizeTitle = Joomla.JText._('TPL_BEEZ3_FONTSIZE'); bigger = Joomla.JText._('TPL_BEEZ3_BIGGER'); reset = Joomla.JText._('TPL_BEEZ3_RESET'); biggerTitle = Joomla.JText._('TPL_BEEZ3_INCREASE_SIZE'); smallerTitle = Joomla.JText._('TPL_BEEZ3_DECREASE_SIZE'); resetTitle = Joomla.JText._('TPL_BEEZ3_REVERT_STYLES_TO_DEFAULT'); }); window.addEvent('domready', setUserOptions); window.addEvent('domready', addControls); window.addEvent('unload', saveSettings);