<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[43332] trunk/src/js/_enqueues/lib/admin-bar.js: Docs: Improve JSDoc for `admin-bar.js`.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/43332">43332</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/43332","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>atimmer</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2018-06-07 14:39:43 +0000 (Thu, 07 Jun 2018)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Docs: Improve JSDoc for `admin-bar.js`.

Props manuelaugustin, terwdan, sjardo, LisanneKluitmans.
Fixes <a href="https://core.trac.wordpress.org/ticket/43871">#43871</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcjs_enqueueslibadminbarjs">trunk/src/js/_enqueues/lib/admin-bar.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcjs_enqueueslibadminbarjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/js/_enqueues/lib/admin-bar.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/js/_enqueues/lib/admin-bar.js   2018-06-04 13:45:13 UTC (rev 43331)
+++ trunk/src/js/_enqueues/lib/admin-bar.js     2018-06-07 14:39:43 UTC (rev 43332)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -10,12 +10,33 @@
</span><span class="cx" style="display: block; padding: 0 10px">        jQuery(document).ready(function($){
</span><span class="cx" style="display: block; padding: 0 10px">                var adminbar = $('#wpadminbar'), refresh, touchOpen, touchClose, disableHoverIntent = false;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                refresh = function(i, el){ // force the browser to refresh the tabbing index
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         /**
+                * Forces the browser to refresh the tabbing index.
+                *
+                * @since 3.3.0
+                *
+                * @param {number}      i  The index of the HTML element to remove the tab index
+                *                         from. This parameter is necessary because we use this
+                *                         function in .each calls.
+                * @param {HTMLElement} el The HTML element to remove the tab index from.
+                *
+                * @return {void}
+                */
+               refresh = function(i, el){
</ins><span class="cx" style="display: block; padding: 0 10px">                         var node = $(el), tab = node.attr('tabindex');
</span><span class="cx" style="display: block; padding: 0 10px">                        if ( tab )
</span><span class="cx" style="display: block; padding: 0 10px">                                node.attr('tabindex', '0').attr('tabindex', tab);
</span><span class="cx" style="display: block; padding: 0 10px">                };
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                /**
+                * Adds or removes the hover class on touch.
+                *
+                * @since 3.5.0
+                *
+                * @param {boolean} unbind If true removes the wp-mobile-hover class.
+                *
+                * @return {void}
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 touchOpen = function(unbind) {
</span><span class="cx" style="display: block; padding: 0 10px">                        adminbar.find('li.menupop').on('click.wp-mobile-hover', function(e) {
</span><span class="cx" style="display: block; padding: 0 10px">                                var el = $(this);
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -43,6 +64,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        });
</span><span class="cx" style="display: block; padding: 0 10px">                };
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                /**
+                * Removes the hover class if clicked or touched outside the admin bar.
+                *
+                * @since 3.5.0
+                *
+                * @return {void}
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 touchClose = function() {
</span><span class="cx" style="display: block; padding: 0 10px">                        var mobileEvent = /Mobile\/.+Safari/.test(navigator.userAgent) ? 'touchstart' : 'click';
</span><span class="cx" style="display: block; padding: 0 10px">                        // close any open drop-downs when the click/touch is not on the toolbar
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -54,6 +82,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                adminbar.removeClass('nojq').removeClass('nojs');
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                // If clicked on the adminbar add the hoverclass, if clicked outside it remove
+               // it.
</ins><span class="cx" style="display: block; padding: 0 10px">                 if ( 'ontouchstart' in window ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        adminbar.on('touchstart', function(){
</span><span class="cx" style="display: block; padding: 0 10px">                                touchOpen(true);
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -65,6 +95,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        touchClose();
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                // Adds or removes the hover class based on the hover intent.
</ins><span class="cx" style="display: block; padding: 0 10px">                 adminbar.find('li.menupop').hoverIntent({
</span><span class="cx" style="display: block; padding: 0 10px">                        over: function() {
</span><span class="cx" style="display: block; padding: 0 10px">                                if ( disableHoverIntent )
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -83,9 +114,21 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        interval: 100
</span><span class="cx" style="display: block; padding: 0 10px">                });
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                // Prevents the toolbar from covering up content when a hash is present in the
+               // URL.
</ins><span class="cx" style="display: block; padding: 0 10px">                 if ( window.location.hash )
</span><span class="cx" style="display: block; padding: 0 10px">                        window.scrollBy( 0, -32 );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                /**
+                * Handles the selected state of the Shortlink link.
+                *
+                * When the input is visible the link should be selected, when the input is
+                * unfocused the link should be unselected.
+                *
+                * @param {Object} e The click event.
+                *
+                * @return {void}
+                **/
</ins><span class="cx" style="display: block; padding: 0 10px">                 $('#wp-admin-bar-get-shortlink').click(function(e){
</span><span class="cx" style="display: block; padding: 0 10px">                        e.preventDefault();
</span><span class="cx" style="display: block; padding: 0 10px">                        $(this).addClass('selected').children('.shortlink-input').blur(function(){
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -93,7 +136,18 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        }).focus().select();
</span><span class="cx" style="display: block; padding: 0 10px">                });
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                /**
+                * Removes the hoverclass if the enter key is pressed.
+                *
+                * Makes sure the tab index is refreshed by refreshing each ab-item
+                * and its children.
+                *
+                * @param {Object} e The keydown event.
+                *
+                * @return {void}
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 $('#wpadminbar li.menupop > .ab-item').bind('keydown.adminbar', function(e){
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        // Key code 13 is the enter key.
</ins><span class="cx" style="display: block; padding: 0 10px">                         if ( e.which != 13 )
</span><span class="cx" style="display: block; padding: 0 10px">                                return;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -116,7 +170,18 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        target.siblings('.ab-sub-wrapper').find('.ab-item').each(refresh);
</span><span class="cx" style="display: block; padding: 0 10px">                }).each(refresh);
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                /**
+                * Removes the hover class when the escape key is pressed.
+                *
+                * Makes sure the tab index is refreshed by refreshing each ab-item
+                * and its children.
+                *
+                * @param {Object} e The keydown event.
+                *
+                * @return {void}
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 $('#wpadminbar .ab-item').bind('keydown.adminbar', function(e){
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        // Key code 27 is the escape key.
</ins><span class="cx" style="display: block; padding: 0 10px">                         if ( e.which != 27 )
</span><span class="cx" style="display: block; padding: 0 10px">                                return;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -129,6 +194,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        target.siblings('.ab-sub-wrapper').find('.ab-item').each(refresh);
</span><span class="cx" style="display: block; padding: 0 10px">                });
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                /**
+                * Scrolls to top of page by clicking the adminbar.
+                *
+                * @param {Object} e The click event.
+                *
+                * @return {void}
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 adminbar.click( function(e) {
</span><span class="cx" style="display: block; padding: 0 10px">                        if ( e.target.id != 'wpadminbar' && e.target.id != 'wp-admin-bar-top-secondary' ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                return;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -139,7 +211,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        e.preventDefault();
</span><span class="cx" style="display: block; padding: 0 10px">                });
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // fix focus bug in WebKit
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         /**
+                * Sets the focus on an element with a href attribute.
+                *
+                * The timeout is used to fix a focus bug in WebKit.
+                *
+                * @param {Object} e The keydown event.
+                *
+                * @return {void}
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 $('.screen-reader-shortcut').keydown( function(e) {
</span><span class="cx" style="display: block; padding: 0 10px">                        var id, ua;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -158,15 +238,29 @@
</span><span class="cx" style="display: block; padding: 0 10px">                });
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $( '#adminbar-search' ).on({
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        /**
+                        * Adds the adminbar-focused class on focus.
+                        *
+                        * @return {void}
+                        */
</ins><span class="cx" style="display: block; padding: 0 10px">                         focus: function() {
</span><span class="cx" style="display: block; padding: 0 10px">                                $( '#adminbarsearch' ).addClass( 'adminbar-focused' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        /**
+                        * Removes the adminbar-focused class on blur.
+                        *
+                        * @return {void}
+                        */
</ins><span class="cx" style="display: block; padding: 0 10px">                         }, blur: function() {
</span><span class="cx" style="display: block; padding: 0 10px">                                $( '#adminbarsearch' ).removeClass( 'adminbar-focused' );
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="cx" style="display: block; padding: 0 10px">                } );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // Empty sessionStorage on logging out
</del><span class="cx" style="display: block; padding: 0 10px">                 if ( 'sessionStorage' in window ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        /**
+                        * Empties sessionStorage on logging out.
+                        *
+                        * @return {void}
+                        */
</ins><span class="cx" style="display: block; padding: 0 10px">                         $('#wp-admin-bar-logout a').click( function() {
</span><span class="cx" style="display: block; padding: 0 10px">                                try {
</span><span class="cx" style="display: block; padding: 0 10px">                                        for ( var key in sessionStorage ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -184,7 +278,26 @@
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px">        });
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        /**
+        * Wrapper function for the adminbar that's used if jQuery isn't available.
+        *
+        * @param {Object} d The document object.
+        * @param {Object} w The window object.
+        *
+        * @return {void}
+        */
</ins><span class="cx" style="display: block; padding: 0 10px">         (function(d, w) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                /**
+                * Adds an event listener to an object.
+                *
+                * @since 3.1.0
+                *
+                * @param {Object}   obj  The object to add the event listener to.
+                * @param {string}   type The type of event.
+                * @param {function} fn   The function to bind to the event listener.
+                *
+                * @return {void}
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 var addEvent = function( obj, type, fn ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        if ( obj.addEventListener )
</span><span class="cx" style="display: block; padding: 0 10px">                                obj.addEventListener(type, fn, false);
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -196,7 +309,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                rselected = new RegExp('\\bselected\\b', 'g'),
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                 * Get the timeout ID of the given element
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+          * Gets the timeout ID of the given element.
+                *
+                * @since 3.1.0
+                *
+                * @param {HTMLElement} el The HTML element.
+                *
+                * @return {number|boolean} The ID value of the timer that is set or false.
</ins><span class="cx" style="display: block; padding: 0 10px">                  */
</span><span class="cx" style="display: block; padding: 0 10px">                getTOID = function(el) {
</span><span class="cx" style="display: block; padding: 0 10px">                        var i = q.length;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -207,11 +326,21 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        return false;
</span><span class="cx" style="display: block; padding: 0 10px">                },
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                /**
+                * Adds the hoverclass to menu items.
+                *
+                * @since 3.1.0
+                *
+                * @param {HTMLElement} t The HTML element.
+                *
+                * @return {void}
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 addHoverClass = function(t) {
</span><span class="cx" style="display: block; padding: 0 10px">                        var i, id, inA, hovering, ul, li,
</span><span class="cx" style="display: block; padding: 0 10px">                                ancestors = [],
</span><span class="cx" style="display: block; padding: 0 10px">                                ancestorLength = 0;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        // aB is adminbar. d is document.
</ins><span class="cx" style="display: block; padding: 0 10px">                         while ( t && t != aB && t != d ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                if ( 'LI' == t.nodeName.toUpperCase() ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                        ancestors[ ancestors.length ] = t;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -224,7 +353,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                t = t.parentNode;
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        // Remove any selected classes.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 // Removes any selected classes.
</ins><span class="cx" style="display: block; padding: 0 10px">                         if ( hovering && hovering.parentNode ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                ul = hovering.parentNode;
</span><span class="cx" style="display: block; padding: 0 10px">                                if ( ul && 'UL' == ul.nodeName.toUpperCase() ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -237,7 +366,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                }
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        /* remove the hover class for any objects not in the immediate element's ancestry */
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 // Removes the hover class for any objects not in the immediate element's ancestry.
</ins><span class="cx" style="display: block; padding: 0 10px">                         i = q.length;
</span><span class="cx" style="display: block; padding: 0 10px">                        while ( i-- ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                inA = false;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -252,6 +381,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="cx" style="display: block; padding: 0 10px">                },
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                /**
+                * Removes the hoverclass from menu items.
+                *
+                * @since 3.1.0
+                *
+                * @param {HTMLElement} t The HTML element.
+                *
+                * @return {void}
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 removeHoverClass = function(t) {
</span><span class="cx" style="display: block; padding: 0 10px">                        while ( t && t != aB && t != d ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                if ( 'LI' == t.nodeName.toUpperCase() ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -266,6 +404,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="cx" style="display: block; padding: 0 10px">                },
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                /**
+                * Handles the click on the Shortlink link in the adminbar.
+                *
+                * @since 3.1.0
+                *
+                * @param {HTMLElement} e The HTML element.
+                *
+                * @return {boolean} Returns false to prevent default click behavior.
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 clickShortlink = function(e) {
</span><span class="cx" style="display: block; padding: 0 10px">                        var i, l, node,
</span><span class="cx" style="display: block; padding: 0 10px">                                t = e.target || e.srcElement;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -304,6 +451,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        return false;
</span><span class="cx" style="display: block; padding: 0 10px">                },
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                /**
+                * Scrolls to the top of the page.
+                *
+                * @since 3.4.0
+                *
+                * @param {HTMLElement} t The HTML element.
+                *
+                * @return {void}
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 scrollToTop = function(t) {
</span><span class="cx" style="display: block; padding: 0 10px">                        var distance, speed, step, steps, timer, speed_step;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre>
</div>
</div>

</body>
</html>