??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/sendmaxagency.com/wp-includes/js/comment-reply.js
⬅ Kembali
/**
* 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 );
Nama
Tipe
Ukuran
Diubah
Aksi
📁 codemirror
dir
—
2026-05-22 04:01
📁 crop
dir
—
2025-08-13 03:47
📁 dist
dir
—
2026-05-22 04:01
📁 imgareaselect
dir
—
2025-08-13 03:47
📁 jcrop
dir
—
2025-08-13 03:47
📁 jquery
dir
—
2025-08-13 03:47
📁 mediaelement
dir
—
2025-08-13 03:47
📁 plupload
dir
—
2025-08-13 03:47
📁 swfupload
dir
—
2025-08-13 03:47
📁 thickbox
dir
—
2025-08-13 03:47
📁 tinymce
dir
—
2025-08-13 03:47
📜 admin-bar.js
js
10.3 KB
2024-05-11 22:28
📜 admin-bar.min.js
js
3.4 KB
2025-02-06 22:27
📜 api-request.js
js
3.2 KB
2020-12-01 08:44
📜 api-request.min.js
js
1023 B
2025-02-06 22:27
📜 autosave.js
js
21.9 KB
2025-01-24 04:54
📜 autosave.min.js
js
5.7 KB
2025-02-06 22:27
📜 backbone.js
js
78.6 KB
2026-05-22 04:01
📜 backbone.min.js
js
23.7 KB
2026-05-22 04:01
📜 clipboard.js
js
26.2 KB
2022-10-04 19:55
📜 clipboard.min.js
js
8.8 KB
2025-02-06 22:27
📜 colorpicker.js
js
28.4 KB
2012-11-17 20:11
📜 colorpicker.min.js
js
16.1 KB
2024-12-14 00:06
📜 comment-reply.js
js
12.2 KB
2024-09-04 00:36
📜 comment-reply.min.js
js
3 KB
2025-02-06 22:27
📜 customize-base.js
js
25.2 KB
2023-05-20 14:19
📜 customize-base.min.js
js
7.7 KB
2025-02-06 22:27
📜 customize-loader.js
js
7.7 KB
2024-04-12 21:47
📜 customize-loader.min.js
js
3.5 KB
2025-02-06 22:27
📜 customize-models.js
js
6.7 KB
2020-06-25 16:43
📜 customize-models.min.js
js
3.6 KB
2025-02-06 22:27
📜 customize-preview-nav-menus.js
js
14.7 KB
2020-07-28 03:35
📜 customize-preview-nav-menus.min.js
js
4.9 KB
2025-02-06 22:27
📜 customize-preview-widgets.js
js
22.7 KB
2020-06-20 16:58
📜 customize-preview-widgets.min.js
js
7.6 KB
2025-02-06 22:27
📜 customize-preview.js
js
27.9 KB
2025-12-03 10:04
📜 customize-preview.min.js
js
10.8 KB
2025-12-03 10:04
📜 customize-selective-refresh.js
js
32.6 KB
2024-04-12 21:47
📜 customize-selective-refresh.min.js
js
10.4 KB
2025-02-06 22:27
📜 customize-views.js
js
5.1 KB
2025-12-03 10:04
📜 customize-views.min.js
js
2.5 KB
2025-12-03 10:04
📜 heartbeat.js
js
23.5 KB
2024-09-12 03:09
📜 heartbeat.min.js
js
5.8 KB
2025-02-06 22:27
📜 hoverIntent.js
js
7.1 KB
2022-01-03 20:03
📜 hoverIntent.min.js
js
1.5 KB
2025-02-06 22:27
📜 hoverintent-js.min.js
js
1.7 KB
2019-12-10 06:03
📜 imagesloaded.min.js
js
5.4 KB
2023-08-11 22:18
📜 json2.js
js
31 B
2025-12-03 10:04
📜 json2.min.js
js
35 B
2025-12-03 10:04
📜 masonry.min.js
js
23.6 KB
2020-06-13 22:53
📜 mce-view.js
js
25.2 KB
2023-10-10 01:31
📜 mce-view.min.js
js
9.5 KB
2025-02-06 22:27
📜 media-audiovideo.js
js
24.1 KB
2026-05-22 04:01
📜 media-audiovideo.min.js
js
11.8 KB
2026-05-22 04:01
📜 media-editor.js
js
28.8 KB
2026-05-22 04:01
📜 media-editor.min.js
js
10.8 KB
2026-05-22 04:01
📜 media-grid.js
js
26 KB
2026-05-22 04:01
📜 media-grid.min.js
js
13 KB
2026-05-22 04:01
📜 media-models.js
js
42.5 KB
2026-05-22 04:01
📜 media-models.min.js
js
13 KB
2026-05-22 04:01
📜 media-views.js
js
266.5 KB
2026-05-22 04:01
📜 media-views.min.js
js
108.1 KB
2026-05-22 04:01
📜 quicktags.js
js
22.1 KB
2021-09-09 03:29
📜 quicktags.min.js
js
10.9 KB
2025-02-06 22:27
📜 shortcode.js
js
10.5 KB
2020-01-29 05:45
📜 shortcode.min.js
js
2.6 KB
2022-09-23 23:55
📜 swfobject.js
js
0 B
2025-12-03 10:04
📜 swfobject.min.js
js
35 B
2025-12-03 10:04
📜 tw-sack.js
js
4.9 KB
2025-12-03 10:04
📜 tw-sack.min.js
js
3.2 KB
2022-04-09 00:07
📜 twemoji.js
js
36.3 KB
2025-12-03 10:04
📜 twemoji.min.js
js
19.4 KB
2025-12-03 10:04
📜 underscore.js
js
67.3 KB
2026-05-22 04:01
📜 underscore.min.js
js
18.6 KB
2026-05-22 04:01
📜 utils.js
js
4.6 KB
2020-01-29 05:45
📜 utils.min.js
js
1.8 KB
2022-09-23 23:55
📜 wp-ajax-response.js
js
3.8 KB
2025-02-08 20:53
📜 wp-ajax-response.min.js
js
2.5 KB
2025-02-08 20:53
📜 wp-api.js
js
45.9 KB
2023-01-10 14:30
📜 wp-api.min.js
js
14.3 KB
2025-02-06 22:27
📜 wp-auth-check.js
js
4.3 KB
2026-05-22 04:01
📜 wp-auth-check.min.js
js
1.6 KB
2026-05-22 04:01
📜 wp-backbone.js
js
14.9 KB
2024-04-12 21:47
📜 wp-backbone.min.js
js
3 KB
2025-02-06 22:27
📜 wp-custom-header.js
js
10.2 KB
2021-04-10 16:40
📜 wp-custom-header.min.js
js
4.3 KB
2025-02-06 22:27
📜 wp-embed-template.js
js
6.6 KB
2021-11-11 07:49
📜 wp-embed-template.min.js
js
3.1 KB
2025-02-06 22:27
📜 wp-embed.js
js
3.1 KB
2023-08-10 23:49
📜 wp-embed.min.js
js
1.2 KB
2025-02-06 22:27
📜 wp-emoji-loader.js
js
12.9 KB
2025-12-03 10:04
📜 wp-emoji-loader.min.js
js
2.8 KB
2025-12-03 10:04
📜 wp-emoji-release.min.js
js
22.2 KB
2025-12-03 10:04
📜 wp-emoji.js
js
8.6 KB
2025-12-03 10:04
📜 wp-emoji.min.js
js
2.8 KB
2025-12-03 10:04
📜 wp-list-revisions.js
js
970 B
2018-06-28 06:30
📜 wp-list-revisions.min.js
js
597 B
2025-02-06 22:27
📜 wp-lists.js
js
24.7 KB
2023-06-24 18:32
📜 wp-lists.min.js
js
7.3 KB
2025-02-06 22:27
📜 wp-pointer.js
js
10 KB
2021-02-17 01:25
📜 wp-pointer.min.js
js
3.5 KB
2025-02-06 22:27
📜 wp-sanitize.js
js
1.6 KB
2026-05-22 04:01
📜 wp-sanitize.min.js
js
402 B
2026-05-22 04:01
📜 wp-util.js
js
4.6 KB
2026-03-10 17:12
📜 wp-util.min.js
js
1.4 KB
2026-03-10 17:12
📜 wpdialog.js
js
569 B
2023-01-25 02:13
📜 wpdialog.min.js
js
281 B
2025-02-06 22:27
📜 wplink.js
js
20.7 KB
2025-01-24 04:54
📜 wplink.min.js
js
11.1 KB
2025-02-06 22:27
📜 zxcvbn-async.js
js
821 B
2018-06-28 06:30
📜 zxcvbn-async.min.js
js
351 B
2021-02-23 21:45
📜 zxcvbn.min.js
js
803 KB
2019-10-26 04:17