2017-08-24 19:58:44 +02:00
|
|
|
/**
|
2017-12-18 15:14:53 +01:00
|
|
|
* Handles the addition of the comment form.
|
2017-08-24 19:58:44 +02:00
|
|
|
*
|
|
|
|
* @since 2.7.0
|
2018-06-28 04:30:15 +02:00
|
|
|
* @output wp-includes/js/comment-reply.js
|
2017-08-24 19:58:44 +02:00
|
|
|
*
|
2017-12-15 14:42:46 +01:00
|
|
|
* @namespace addComment
|
|
|
|
*
|
2017-08-24 19:58:44 +02:00
|
|
|
* @type {Object}
|
|
|
|
*/
|
2018-08-19 15:33:24 +02:00
|
|
|
window.addComment = ( function( window ) {
|
2017-12-03 23:37:45 +01:00
|
|
|
// Avoid scope lookups on commonly used variables.
|
|
|
|
var document = window.document;
|
|
|
|
|
|
|
|
// Settings.
|
|
|
|
var config = {
|
2020-03-25 05:55:10 +01:00
|
|
|
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'
|
2017-12-03 23:37:45 +01:00
|
|
|
};
|
|
|
|
|
2019-02-18 05:27:50 +01:00
|
|
|
// Cross browser MutationObserver.
|
|
|
|
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
|
|
|
|
|
2017-12-03 23:37:45 +01:00
|
|
|
// 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.
|
|
|
|
*/
|
2019-03-05 02:52:51 +01:00
|
|
|
var supportsDataset = !! document.documentElement.dataset;
|
2017-12-03 23:37:45 +01:00
|
|
|
|
|
|
|
// For holding the cancel element.
|
|
|
|
var cancelElement;
|
|
|
|
|
|
|
|
// For holding the comment form element.
|
|
|
|
var commentFormElement;
|
|
|
|
|
|
|
|
// The respond element.
|
|
|
|
var respondElement;
|
|
|
|
|
2019-02-18 05:27:50 +01:00
|
|
|
// The mutation observer.
|
|
|
|
var observer;
|
|
|
|
|
2019-03-05 02:52:51 +01:00
|
|
|
if ( cutsTheMustard && document.readyState !== 'loading' ) {
|
|
|
|
ready();
|
|
|
|
} else if ( cutsTheMustard ) {
|
|
|
|
window.addEventListener( 'DOMContentLoaded', ready, false );
|
|
|
|
}
|
2017-12-03 23:37:45 +01:00
|
|
|
|
2019-03-05 02:52:51 +01:00
|
|
|
/**
|
|
|
|
* Sets up object variables after the DOM is ready.
|
|
|
|
*
|
|
|
|
* @since 5.1.1
|
|
|
|
*/
|
|
|
|
function ready() {
|
|
|
|
// Initialise the events.
|
|
|
|
init();
|
|
|
|
|
|
|
|
// Set up a MutationObserver to check for comments loaded late.
|
|
|
|
observeChanges();
|
|
|
|
}
|
2019-02-18 05:27:50 +01:00
|
|
|
|
2017-08-24 19:58:44 +02:00
|
|
|
/**
|
2017-12-03 23:37:45 +01:00
|
|
|
* Add events to links classed .comment-reply-link.
|
2017-08-24 19:58:44 +02:00
|
|
|
*
|
2017-12-03 23:37:45 +01:00
|
|
|
* 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().
|
|
|
|
*
|
2019-01-03 20:29:51 +01:00
|
|
|
* @since 5.1.0
|
2017-08-24 19:58:44 +02:00
|
|
|
*
|
2017-12-15 14:42:46 +01:00
|
|
|
* @memberOf addComment
|
|
|
|
*
|
2017-12-03 23:37:45 +01:00
|
|
|
* @param {HTMLElement} context The parent DOM element to search for links.
|
2017-08-24 19:58:44 +02:00
|
|
|
*/
|
2017-12-03 23:37:45 +01:00
|
|
|
function init( context ) {
|
2019-02-18 05:27:50 +01:00
|
|
|
if ( ! cutsTheMustard ) {
|
2017-12-03 23:37:45 +01:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Get required elements.
|
|
|
|
cancelElement = getElementById( config.cancelReplyId );
|
|
|
|
commentFormElement = getElementById( config.commentFormId );
|
|
|
|
|
|
|
|
// No cancel element, no replies.
|
|
|
|
if ( ! cancelElement ) {
|
2012-08-23 02:04:18 +02:00
|
|
|
return;
|
2015-11-10 01:43:26 +01:00
|
|
|
}
|
2012-08-23 02:04:18 +02:00
|
|
|
|
2017-12-03 23:37:45 +01:00
|
|
|
cancelElement.addEventListener( 'touchstart', cancelEvent );
|
|
|
|
cancelElement.addEventListener( 'click', cancelEvent );
|
|
|
|
|
2020-01-29 01:45:18 +01:00
|
|
|
// Submit the comment form when the user types [Ctrl] or [Cmd] + [Enter].
|
2019-08-13 23:26:56 +02:00
|
|
|
var submitFormHandler = function( e ) {
|
|
|
|
if ( ( e.metaKey || e.ctrlKey ) && e.keyCode === 13 ) {
|
|
|
|
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;
|
|
|
|
}
|
2019-08-14 02:02:55 +02:00
|
|
|
};
|
|
|
|
|
2019-11-11 12:51:03 +01:00
|
|
|
if ( commentFormElement ) {
|
|
|
|
commentFormElement.addEventListener( 'keydown', submitFormHandler );
|
|
|
|
}
|
2019-08-13 23:26:56 +02:00
|
|
|
|
2017-12-03 23:37:45 +01:00
|
|
|
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.
|
|
|
|
*
|
2019-01-03 20:29:51 +01:00
|
|
|
* @since 5.1.0
|
2017-12-03 23:37:45 +01:00
|
|
|
*
|
|
|
|
* @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;
|
|
|
|
}
|
2012-08-23 02:04:18 +02:00
|
|
|
|
2017-12-03 23:37:45 +01:00
|
|
|
if ( document.getElementsByClassName ) {
|
|
|
|
// Fastest.
|
|
|
|
allReplyLinks = context.getElementsByClassName( selectorClass );
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
// Fast.
|
|
|
|
allReplyLinks = context.querySelectorAll( '.' + selectorClass );
|
2012-08-23 02:04:18 +02:00
|
|
|
}
|
|
|
|
|
2017-12-03 23:37:45 +01:00
|
|
|
return allReplyLinks;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Cancel event handler.
|
|
|
|
*
|
2019-01-03 20:29:51 +01:00
|
|
|
* @since 5.1.0
|
2017-12-03 23:37:45 +01:00
|
|
|
*
|
|
|
|
* @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;
|
2015-11-10 01:43:26 +01:00
|
|
|
}
|
2012-08-23 02:04:18 +02:00
|
|
|
|
2017-12-03 23:37:45 +01:00
|
|
|
getElementById( config.parentIdFieldId ).value = '0';
|
|
|
|
|
|
|
|
// Move the respond form back in place of the temporary element.
|
2020-03-25 05:55:10 +01:00
|
|
|
var headingText = temporaryElement.textContent;
|
|
|
|
temporaryElement.parentNode.replaceChild( respondElement, temporaryElement );
|
2017-12-03 23:37:45 +01:00
|
|
|
cancelLink.style.display = 'none';
|
2020-03-25 05:55:10 +01:00
|
|
|
var replyHeadingElement = getElementById( config.commentReplyTitleId );
|
|
|
|
var replyHeadingTextNode = replyHeadingElement && replyHeadingElement.firstChild;
|
|
|
|
if ( replyHeadingTextNode && replyHeadingTextNode.nodeType === Node.TEXT_NODE && headingText ) {
|
|
|
|
replyHeadingTextNode.textContent = headingText;
|
|
|
|
}
|
2017-12-03 23:37:45 +01:00
|
|
|
event.preventDefault();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Click event handler.
|
|
|
|
*
|
2019-01-03 20:29:51 +01:00
|
|
|
* @since 5.1.0
|
2017-12-03 23:37:45 +01:00
|
|
|
*
|
|
|
|
* @param {Event} event The calling event.
|
|
|
|
*/
|
|
|
|
function clickEvent( event ) {
|
2020-03-25 05:55:10 +01:00
|
|
|
var replyNode = getElementById( config.commentReplyTitleId );
|
|
|
|
var defaultReplyHeading = replyNode && replyNode.firstChild.textContent;
|
2017-12-03 23:37:45 +01:00
|
|
|
var replyLink = this,
|
|
|
|
commId = getDataAttribute( replyLink, 'belowelement'),
|
|
|
|
parentId = getDataAttribute( replyLink, 'commentid' ),
|
2020-03-25 05:55:10 +01:00
|
|
|
respondId = getDataAttribute( replyLink, 'respondelement' ),
|
|
|
|
postId = getDataAttribute( replyLink, 'postid' ),
|
|
|
|
replyTo = getDataAttribute( replyLink, 'replyto' ) || defaultReplyHeading,
|
2017-12-03 23:37:45 +01:00
|
|
|
follow;
|
|
|
|
|
2019-03-05 02:52:51 +01:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2017-12-03 23:37:45 +01:00
|
|
|
/*
|
|
|
|
* Third party comments systems can hook into this function via the global scope,
|
|
|
|
* therefore the click event needs to reference the global scope.
|
2017-08-24 19:58:44 +02:00
|
|
|
*/
|
2020-03-25 05:55:10 +01:00
|
|
|
follow = window.addComment.moveForm( commId, parentId, respondId, postId, replyTo );
|
2017-12-03 23:37:45 +01:00
|
|
|
if ( false === follow ) {
|
|
|
|
event.preventDefault();
|
|
|
|
}
|
|
|
|
}
|
2012-08-23 02:04:18 +02:00
|
|
|
|
2019-02-18 05:27:50 +01:00
|
|
|
/**
|
|
|
|
* Creates a mutation observer to check for newly inserted comments.
|
|
|
|
*
|
|
|
|
* @since 5.1.0
|
|
|
|
*/
|
|
|
|
function observeChanges() {
|
|
|
|
if ( ! MutationObserver ) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
var observerOptions = {
|
|
|
|
childList: true,
|
2019-07-15 18:46:55 +02:00
|
|
|
subtree: true
|
2019-02-18 05:27:50 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-03 23:37:45 +01:00
|
|
|
/**
|
|
|
|
* Backward compatible getter of data-* attribute.
|
|
|
|
*
|
|
|
|
* Uses element.dataset if it exists, otherwise uses getAttribute.
|
|
|
|
*
|
2019-01-03 20:29:51 +01:00
|
|
|
* @since 5.1.0
|
2017-12-03 23:37:45 +01:00
|
|
|
*
|
|
|
|
* @param {HTMLElement} Element DOM element with the attribute.
|
2020-07-28 01:35:02 +02:00
|
|
|
* @param {string} Attribute the attribute to get.
|
2017-12-03 23:37:45 +01:00
|
|
|
*
|
2020-07-28 01:35:02 +02:00
|
|
|
* @return {string}
|
2017-12-03 23:37:45 +01:00
|
|
|
*/
|
|
|
|
function getDataAttribute( element, attribute ) {
|
|
|
|
if ( supportsDataset ) {
|
|
|
|
return element.dataset[attribute];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
return element.getAttribute( 'data-' + attribute );
|
|
|
|
}
|
|
|
|
}
|
2012-08-23 02:04:18 +02:00
|
|
|
|
2017-12-03 23:37:45 +01:00
|
|
|
/**
|
|
|
|
* Get element by ID.
|
|
|
|
*
|
|
|
|
* Local alias for document.getElementById.
|
|
|
|
*
|
2019-01-03 20:29:51 +01:00
|
|
|
* @since 5.1.0
|
2017-12-03 23:37:45 +01:00
|
|
|
*
|
|
|
|
* @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
|
|
|
|
*
|
2017-12-15 14:42:46 +01:00
|
|
|
* @memberOf addComment
|
|
|
|
*
|
2020-07-28 01:35:02 +02:00
|
|
|
* @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.
|
2017-12-03 23:37:45 +01:00
|
|
|
*/
|
2020-03-25 05:55:10 +01:00
|
|
|
function moveForm( addBelowId, commentId, respondId, postId, replyTo ) {
|
2017-12-03 23:37:45 +01:00
|
|
|
// 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;
|
|
|
|
|
2020-03-25 05:55:10 +01:00
|
|
|
var replyHeading = getElementById( config.commentReplyTitleId );
|
|
|
|
var replyHeadingTextNode = replyHeading && replyHeading.firstChild;
|
|
|
|
|
2017-12-03 23:37:45 +01:00
|
|
|
if ( ! addBelowElement || ! respondElement || ! parentIdField ) {
|
|
|
|
// Missing key elements, fail.
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2020-03-25 05:55:10 +01:00
|
|
|
if ( 'undefined' === typeof replyTo ) {
|
|
|
|
replyTo = replyHeadingTextNode && replyHeadingTextNode.textContent;
|
|
|
|
}
|
|
|
|
|
2017-12-03 23:37:45 +01:00
|
|
|
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 );
|
2020-03-25 05:55:10 +01:00
|
|
|
if ( replyHeadingTextNode.nodeType === Node.TEXT_NODE ) {
|
|
|
|
replyHeadingTextNode.textContent = replyTo;
|
|
|
|
}
|
2015-11-18 20:15:28 +01:00
|
|
|
/*
|
2017-12-03 23:37:45 +01:00
|
|
|
* This is for backward compatibility with third party commenting systems
|
|
|
|
* hooking into the event using older techniques.
|
2015-11-18 20:15:28 +01:00
|
|
|
*/
|
2019-08-14 02:02:55 +02:00
|
|
|
cancelElement.onclick = function() {
|
2017-12-03 23:37:45 +01:00
|
|
|
return false;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Focus on the first field in the comment form.
|
2015-11-10 01:43:26 +01:00
|
|
|
try {
|
2017-12-03 23:37:45 +01:00
|
|
|
for ( var i = 0; i < commentFormElement.elements.length; i++ ) {
|
|
|
|
element = commentFormElement.elements[i];
|
2015-11-18 20:15:28 +01:00
|
|
|
cssHidden = false;
|
2015-11-10 01:43:26 +01:00
|
|
|
|
2017-12-03 23:37:45 +01:00
|
|
|
// Get elements computed style.
|
2015-11-10 01:43:26 +01:00
|
|
|
if ( 'getComputedStyle' in window ) {
|
2017-12-03 23:37:45 +01:00
|
|
|
// Modern browsers.
|
2015-11-18 20:15:28 +01:00
|
|
|
style = window.getComputedStyle( element );
|
|
|
|
} else if ( document.documentElement.currentStyle ) {
|
2017-12-03 23:37:45 +01:00
|
|
|
// IE 8.
|
2015-11-18 20:15:28 +01:00
|
|
|
style = element.currentStyle;
|
|
|
|
}
|
2015-11-10 01:43:26 +01:00
|
|
|
|
2015-11-18 20:15:28 +01:00
|
|
|
/*
|
|
|
|
* 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;
|
|
|
|
}
|
2015-11-10 01:43:26 +01:00
|
|
|
|
2015-11-18 20:15:28 +01:00
|
|
|
// Skip form elements that are hidden or disabled.
|
|
|
|
if ( 'hidden' === element.type || element.disabled || cssHidden ) {
|
|
|
|
continue;
|
2015-11-10 01:43:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
element.focus();
|
|
|
|
// Stop after the first focusable element.
|
|
|
|
break;
|
|
|
|
}
|
2017-12-03 23:37:45 +01:00
|
|
|
}
|
|
|
|
catch(e) {
|
2015-11-18 20:15:28 +01:00
|
|
|
|
2017-12-03 23:37:45 +01:00
|
|
|
}
|
2012-08-23 02:04:18 +02:00
|
|
|
|
2017-12-03 23:37:45 +01:00
|
|
|
/*
|
|
|
|
* false is returned for backward compatibility with third party commenting systems
|
|
|
|
* hooking into this function.
|
|
|
|
*/
|
2012-08-23 02:04:18 +02:00
|
|
|
return false;
|
2017-12-03 23:37:45 +01:00
|
|
|
}
|
2012-08-23 02:04:18 +02:00
|
|
|
|
2017-08-24 19:58:44 +02:00
|
|
|
/**
|
2017-12-03 23:37:45 +01:00
|
|
|
* Add placeholder element.
|
|
|
|
*
|
|
|
|
* Places a place holder element above the #respond element for
|
|
|
|
* the form to be returned to if needs be.
|
2017-08-24 19:58:44 +02:00
|
|
|
*
|
|
|
|
* @since 2.7.0
|
|
|
|
*
|
2017-12-03 23:37:45 +01:00
|
|
|
* @param {HTMLelement} respondElement the #respond element holding comment form.
|
2017-08-24 19:58:44 +02:00
|
|
|
*/
|
2017-12-03 23:37:45 +01:00
|
|
|
function addPlaceHolder( respondElement ) {
|
|
|
|
var temporaryFormId = config.temporaryFormId;
|
|
|
|
var temporaryElement = getElementById( temporaryFormId );
|
2020-03-25 05:55:10 +01:00
|
|
|
var replyElement = getElementById( config.commentReplyTitleId );
|
|
|
|
var initialHeadingText = ( 'undefined' !== typeof replyElement ) ? replyElement.firstChild.textContent : '';
|
2017-12-03 23:37:45 +01:00
|
|
|
|
|
|
|
if ( temporaryElement ) {
|
|
|
|
// The element already exists, no need to recreate.
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
temporaryElement = document.createElement( 'div' );
|
|
|
|
temporaryElement.id = temporaryFormId;
|
|
|
|
temporaryElement.style.display = 'none';
|
2020-03-25 05:55:10 +01:00
|
|
|
temporaryElement.textContent = initialHeadingText;
|
2017-12-03 23:37:45 +01:00
|
|
|
respondElement.parentNode.insertBefore( temporaryElement, respondElement );
|
2012-08-23 02:04:18 +02:00
|
|
|
}
|
2017-12-03 23:37:45 +01:00
|
|
|
|
|
|
|
return {
|
|
|
|
init: init,
|
|
|
|
moveForm: moveForm
|
|
|
|
};
|
|
|
|
})( window );
|