<!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>[26212] trunk/src/wp-includes/js/quicktags.js: Fix JSHint errors in quicktags.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 { 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">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/26212">26212</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2013-11-15 14:25:29 +0000 (Fri, 15 Nov 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fix JSHint errors in quicktags.js. Ignore deprecated API rather than marking it as exported globals.

props kovshenin.
fixes <a href="http://core.trac.wordpress.org/ticket/26046">#26046</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesjsquicktagsjs">trunk/src/wp-includes/js/quicktags.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesjsquicktagsjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/quicktags.js (26211 => 26212)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/quicktags.js    2013-11-15 14:19:51 UTC (rev 26211)
+++ trunk/src/wp-includes/js/quicktags.js       2013-11-15 14:25:29 UTC (rev 26212)
</span><span class="lines">@@ -1,3 +1,4 @@
</span><ins>+/* global adminpage, wpActiveEditor, quicktagsL10n, wpLink, fullscreen, prompt */
</ins><span class="cx"> /*
</span><span class="cx">  * Quicktags
</span><span class="cx">  *
</span><span class="lines">@@ -21,14 +22,17 @@
</span><span class="cx"> // by Alex King
</span><span class="cx"> // http://www.alexking.org/
</span><span class="cx"> 
</span><del>-var QTags, edButtons = [], edCanvas,
</del><ins>+var QTags, edCanvas,
+       edButtons = [];
</ins><span class="cx"> 
</span><ins>+/* jshint ignore:start */
+
</ins><span class="cx"> /**
</span><span class="cx">  * Back-compat
</span><span class="cx">  *
</span><span class="cx">  * Define all former global functions so plugins that hack quicktags.js directly don't cause fatal errors.
</span><span class="cx">  */
</span><del>-edAddTag = function(){},
</del><ins>+var edAddTag = function(){},
</ins><span class="cx"> edCheckOpenTags = function(){},
</span><span class="cx"> edCloseAllTags = function(){},
</span><span class="cx"> edInsertImage = function(){},
</span><span class="lines">@@ -65,16 +69,18 @@
</span><span class="cx">  * Added for back compatibility, use QTags.addButton() as it gives more flexibility like type of button, button placement, etc.
</span><span class="cx">  * @see QTags.addButton()
</span><span class="cx">  */
</span><del>-function edButton(id, display, tagStart, tagEnd, access, open) {
</del><ins>+function edButton(id, display, tagStart, tagEnd, access) {
</ins><span class="cx">   return QTags.addButton( id, display, tagStart, tagEnd, access, '', -1 );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/* jshint ignore:end */
+
</ins><span class="cx"> (function(){
</span><span class="cx">  // private stuff is prefixed with an underscore
</span><span class="cx">  var _domReady = function(func) {
</span><del>-               var t, i,  DOMContentLoaded;
</del><ins>+                var t, i, DOMContentLoaded, _tryReady;
</ins><span class="cx"> 
</span><del>-               if ( typeof jQuery != 'undefined' ) {
</del><ins>+                if ( typeof jQuery !== 'undefined' ) {
</ins><span class="cx">                   jQuery(document).ready(func);
</span><span class="cx">          } else {
</span><span class="cx">                  t = _domReady;
</span><span class="lines">@@ -105,16 +111,17 @@
</span><span class="cx">                                  document.attachEvent('onreadystatechange', DOMContentLoaded);
</span><span class="cx">                                  window.attachEvent('onload', t.ready);
</span><span class="cx"> 
</span><del>-                                       (function(){
</del><ins>+                                        _tryReady = function() {
</ins><span class="cx">                                           try {
</span><del>-                                                       document.documentElement.doScroll("left");
</del><ins>+                                                        document.documentElement.doScroll('left');
</ins><span class="cx">                                           } catch(e) {
</span><del>-                                                       setTimeout(arguments.callee, 50);
</del><ins>+                                                        setTimeout(_tryReady, 50);
</ins><span class="cx">                                                   return;
</span><span class="cx">                                          }
</span><span class="cx"> 
</span><span class="cx">                                          t.ready();
</span><del>-                                       })();
</del><ins>+                                        };
+                                       _tryReady();
</ins><span class="cx">                           }
</span><span class="cx"> 
</span><span class="cx">                          t.eventAttached = true;
</span><span class="lines">@@ -128,11 +135,12 @@
</span><span class="cx">          zeroise = function(number) {
</span><span class="cx">                  var str = number.toString();
</span><span class="cx"> 
</span><del>-                       if ( str.length < 2 )
-                               str = "0" + str;
</del><ins>+                        if ( str.length < 2 ) {
+                               str = '0' + str;
+                       }
</ins><span class="cx"> 
</span><span class="cx">                  return str;
</span><del>-               }
</del><ins>+                };
</ins><span class="cx"> 
</span><span class="cx">          return now.getUTCFullYear() + '-' +
</span><span class="cx">                  zeroise( now.getUTCMonth() + 1 ) + '-' +
</span><span class="lines">@@ -145,10 +153,11 @@
</span><span class="cx">  qt;
</span><span class="cx"> 
</span><span class="cx">  qt = QTags = function(settings) {
</span><del>-               if ( typeof(settings) == 'string' )
</del><ins>+                if ( typeof(settings) === 'string' ) {
</ins><span class="cx">                   settings = {id: settings};
</span><del>-               else if ( typeof(settings) != 'object' )
</del><ins>+                } else if ( typeof(settings) !== 'object' ) {
</ins><span class="cx">                   return false;
</span><ins>+               }
</ins><span class="cx"> 
</span><span class="cx">          var t = this,
</span><span class="cx">                  id = settings.id,
</span><span class="lines">@@ -156,15 +165,16 @@
</span><span class="cx">                  name = 'qt_' + id,
</span><span class="cx">                  tb, onclick, toolbar_id;
</span><span class="cx"> 
</span><del>-               if ( !id || !canvas )
</del><ins>+                if ( !id || !canvas ) {
</ins><span class="cx">                   return false;
</span><ins>+               }
</ins><span class="cx"> 
</span><span class="cx">          t.name = name;
</span><span class="cx">          t.id = id;
</span><span class="cx">          t.canvas = canvas;
</span><span class="cx">          t.settings = settings;
</span><span class="cx"> 
</span><del>-               if ( id == 'content' && typeof(adminpage) == 'string' && ( adminpage == 'post-new-php' || adminpage == 'post-php' ) ) {
</del><ins>+                if ( id === 'content' && typeof(adminpage) === 'string' && ( adminpage === 'post-new-php' || adminpage === 'post-php' ) ) {
</ins><span class="cx">                   // back compat hack :-(
</span><span class="cx">                  edCanvas = canvas;
</span><span class="cx">                  toolbar_id = 'ed_toolbar';
</span><span class="lines">@@ -185,8 +195,9 @@
</span><span class="cx">                  var target = e.target || e.srcElement, visible = target.clientWidth || target.offsetWidth, i;
</span><span class="cx"> 
</span><span class="cx">                  // don't call the callback on pressing the accesskey when the button is not visible
</span><del>-                       if ( !visible )
</del><ins>+                        if ( !visible ) {
</ins><span class="cx">                           return;
</span><ins>+                       }
</ins><span class="cx"> 
</span><span class="cx">                  // as long as it has the class ed_button, execute the callback
</span><span class="cx">                  if ( / ed_button /.test(' ' + target.className + ' ') ) {
</span><span class="lines">@@ -194,8 +205,9 @@
</span><span class="cx">                          t.canvas = canvas = document.getElementById(id);
</span><span class="cx">                          i = target.id.replace(name + '_', '');
</span><span class="cx"> 
</span><del>-                               if ( t.theButtons[i] )
</del><ins>+                                if ( t.theButtons[i] ) {
</ins><span class="cx">                                   t.theButtons[i].callback.call(t.theButtons[i], target, canvas, t);
</span><ins>+                               }
</ins><span class="cx">                   }
</span><span class="cx">          };
</span><span class="cx"> 
</span><span class="lines">@@ -232,8 +244,9 @@
</span><span class="cx">                  defaults = ',strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,';
</span><span class="cx"> 
</span><span class="cx">          for ( inst in t.instances ) {
</span><del>-                       if ( inst == 0 )
</del><ins>+                        if ( inst === 0 ) {
</ins><span class="cx">                           continue;
</span><ins>+                       }
</ins><span class="cx"> 
</span><span class="cx">                  ed = t.instances[inst];
</span><span class="cx">                  canvas = ed.canvas;
</span><span class="lines">@@ -244,34 +257,38 @@
</span><span class="cx">                  use = '';
</span><span class="cx"> 
</span><span class="cx">                  // set buttons
</span><del>-                       if ( settings.buttons )
</del><ins>+                        if ( settings.buttons ) {
</ins><span class="cx">                           use = ','+settings.buttons+',';
</span><ins>+                       }
</ins><span class="cx"> 
</span><span class="cx">                  for ( i in edButtons ) {
</span><del>-                               if ( !edButtons[i] )
</del><ins>+                                if ( !edButtons[i] ) {
</ins><span class="cx">                                   continue;
</span><ins>+                               }
</ins><span class="cx"> 
</span><span class="cx">                          id = edButtons[i].id;
</span><del>-                               if ( use && defaults.indexOf(','+id+',') != -1 && use.indexOf(','+id+',') == -1 )
</del><ins>+                                if ( use && defaults.indexOf( ',' + id + ',' ) !== -1 && use.indexOf( ',' + id + ',' ) === -1 ) {
</ins><span class="cx">                                   continue;
</span><ins>+                               }
</ins><span class="cx"> 
</span><del>-                               if ( !edButtons[i].instance || edButtons[i].instance == inst ) {
</del><ins>+                                if ( !edButtons[i].instance || edButtons[i].instance === inst ) {
</ins><span class="cx">                                   theButtons[id] = edButtons[i];
</span><span class="cx"> 
</span><del>-                                       if ( edButtons[i].html )
</del><ins>+                                        if ( edButtons[i].html ) {
</ins><span class="cx">                                           html += edButtons[i].html(name + '_');
</span><ins>+                                       }
</ins><span class="cx">                           }
</span><span class="cx">                  }
</span><span class="cx"> 
</span><del>-                       if ( use && use.indexOf(',fullscreen,') != -1 ) {
-                               theButtons['fullscreen'] = new qt.FullscreenButton();
-                               html += theButtons['fullscreen'].html(name + '_');
</del><ins>+                        if ( use && use.indexOf(',fullscreen,') !== -1 ) {
+                               theButtons.fullscreen = new qt.FullscreenButton();
+                               html += theButtons.fullscreen.html(name + '_');
</ins><span class="cx">                   }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-                       if ( 'rtl' == document.getElementsByTagName('html')[0].dir ) {
-                               theButtons['textdirection'] = new qt.TextDirectionButton();
-                               html += theButtons['textdirection'].html(name + '_');
</del><ins>+                        if ( 'rtl' === document.getElementsByTagName('html')[0].dir ) {
+                               theButtons.textdirection = new qt.TextDirectionButton();
+                               html += theButtons.textdirection.html(name + '_');
</ins><span class="cx">                   }
</span><span class="cx"> 
</span><span class="cx">                  ed.toolbar.innerHTML = html;
</span><span class="lines">@@ -309,8 +326,9 @@
</span><span class="cx">  qt.addButton = function( id, display, arg1, arg2, access_key, title, priority, instance ) {
</span><span class="cx">          var btn;
</span><span class="cx"> 
</span><del>-               if ( !id || !display )
</del><ins>+                if ( !id || !display ) {
</ins><span class="cx">                   return;
</span><ins>+               }
</ins><span class="cx"> 
</span><span class="cx">          priority = priority || 0;
</span><span class="cx">          arg2 = arg2 || '';
</span><span class="lines">@@ -324,12 +342,13 @@
</span><span class="cx">                  return;
</span><span class="cx">          }
</span><span class="cx"> 
</span><del>-               if ( priority == -1 ) // back-compat
</del><ins>+                if ( priority === -1 ) { // back-compat
</ins><span class="cx">                   return btn;
</span><ins>+               }
</ins><span class="cx"> 
</span><span class="cx">          if ( priority > 0 ) {
</span><del>-                       while ( typeof(edButtons[priority]) != 'undefined' ) {
-                               priority++
</del><ins>+                        while ( typeof(edButtons[priority]) !== 'undefined' ) {
+                               priority++;
</ins><span class="cx">                   }
</span><span class="cx"> 
</span><span class="cx">                  edButtons[priority] = btn;
</span><span class="lines">@@ -337,22 +356,24 @@
</span><span class="cx">                  edButtons[edButtons.length] = btn;
</span><span class="cx">          }
</span><span class="cx"> 
</span><del>-               if ( this.buttonsInitDone )
</del><ins>+                if ( this.buttonsInitDone ) {
</ins><span class="cx">                   this._buttonsInit(); // add the button HTML to all instances toolbars if addButton() was called too late
</span><ins>+               }
</ins><span class="cx">   };
</span><span class="cx"> 
</span><span class="cx">  qt.insertContent = function(content) {
</span><span class="cx">          var sel, startPos, endPos, scrollTop, text, canvas = document.getElementById(wpActiveEditor);
</span><span class="cx"> 
</span><del>-               if ( !canvas )
</del><ins>+                if ( !canvas ) {
</ins><span class="cx">                   return false;
</span><ins>+               }
</ins><span class="cx"> 
</span><span class="cx">          if ( document.selection ) { //IE
</span><span class="cx">                  canvas.focus();
</span><span class="cx">                  sel = document.selection.createRange();
</span><span class="cx">                  sel.text = content;
</span><span class="cx">                  canvas.focus();
</span><del>-               } else if ( canvas.selectionStart || canvas.selectionStart == '0' ) { // FF, WebKit, Opera
</del><ins>+                } else if ( canvas.selectionStart || canvas.selectionStart === '0' ) { // FF, WebKit, Opera
</ins><span class="cx">                   text = canvas.value;
</span><span class="cx">                  startPos = canvas.selectionStart;
</span><span class="cx">                  endPos = canvas.selectionEnd;
</span><span class="lines">@@ -419,7 +440,7 @@
</span><span class="cx">          var t = this, i = 0, ret = false;
</span><span class="cx">          if ( ed.openTags ) {
</span><span class="cx">                  while ( ret === false && i < ed.openTags.length ) {
</span><del>-                               ret = ed.openTags[i] == t.id ? i : false;
</del><ins>+                                ret = ed.openTags[i] === t.id ? i : false;
</ins><span class="cx">                           i ++;
</span><span class="cx">                  }
</span><span class="cx">          } else {
</span><span class="lines">@@ -434,10 +455,11 @@
</span><span class="cx">                  canvas.focus();
</span><span class="cx">                  sel = document.selection.createRange();
</span><span class="cx">                  if ( sel.text.length > 0 ) {
</span><del>-                               if ( !t.tagEnd )
</del><ins>+                                if ( !t.tagEnd ) {
</ins><span class="cx">                                   sel.text = sel.text + t.tagStart;
</span><del>-                               else
</del><ins>+                                } else {
</ins><span class="cx">                                   sel.text = t.tagStart + sel.text + endTag;
</span><ins>+                               }
</ins><span class="cx">                   } else {
</span><span class="cx">                          if ( !t.tagEnd ) {
</span><span class="cx">                                  sel.text = t.tagStart;
</span><span class="lines">@@ -450,7 +472,7 @@
</span><span class="cx">                          }
</span><span class="cx">                  }
</span><span class="cx">                  canvas.focus();
</span><del>-               } else if ( canvas.selectionStart || canvas.selectionStart == '0' ) { // FF, WebKit, Opera
</del><ins>+                } else if ( canvas.selectionStart || canvas.selectionStart === '0' ) { // FF, WebKit, Opera
</ins><span class="cx">                   startPos = canvas.selectionStart;
</span><span class="cx">                  endPos = canvas.selectionEnd;
</span><span class="cx">                  cursorPos = endPos;
</span><span class="lines">@@ -458,7 +480,7 @@
</span><span class="cx">                  l = v.substring(0, startPos); // left of the selection
</span><span class="cx">                  r = v.substring(endPos, v.length); // right of the selection
</span><span class="cx">                  i = v.substring(startPos, endPos); // inside the selection
</span><del>-                       if ( startPos != endPos ) {
</del><ins>+                        if ( startPos !== endPos ) {
</ins><span class="cx">                           if ( !t.tagEnd ) {
</span><span class="cx">                                  canvas.value = l + i + t.tagStart + r; // insert self closing tags after the selection
</span><span class="cx">                                  cursorPos += t.tagStart.length;
</span><span class="lines">@@ -517,10 +539,11 @@
</span><span class="cx">                          button = ed.getButton(tbo[tbo.length - 1]);
</span><span class="cx">                          element = document.getElementById(ed.name + '_' + button.id);
</span><span class="cx"> 
</span><del>-                               if ( e )
</del><ins>+                                if ( e ) {
</ins><span class="cx">                                   button.callback.call(button, element, c, ed);
</span><del>-                               else
</del><ins>+                                } else {
</ins><span class="cx">                                   button.closeTag(element, ed);
</span><ins>+                               }
</ins><span class="cx">                   }
</span><span class="cx">          }
</span><span class="cx">  };
</span><span class="lines">@@ -540,13 +563,14 @@
</span><span class="cx">  qt.LinkButton.prototype.callback = function(e, c, ed, defaultValue) {
</span><span class="cx">          var URL, t = this;
</span><span class="cx"> 
</span><del>-               if ( typeof(wpLink) != 'undefined' ) {
</del><ins>+                if ( typeof(wpLink) !== 'undefined' ) {
</ins><span class="cx">                   wpLink.open();
</span><span class="cx">                  return;
</span><span class="cx">          }
</span><span class="cx"> 
</span><del>-               if ( ! defaultValue )
</del><ins>+                if ( ! defaultValue ) {
</ins><span class="cx">                   defaultValue = 'http://';
</span><ins>+               }
</ins><span class="cx"> 
</span><span class="cx">          if ( t.isOpen(ed) === false ) {
</span><span class="cx">                  URL = prompt(quicktagsL10n.enterURL, defaultValue);
</span><span class="lines">@@ -581,26 +605,28 @@
</span><span class="cx">  };
</span><span class="cx">  qt.FullscreenButton.prototype = new qt.Button();
</span><span class="cx">  qt.FullscreenButton.prototype.callback = function(e, c) {
</span><del>-               if ( !c.id || typeof(fullscreen) == 'undefined' )
</del><ins>+                if ( !c.id || typeof(fullscreen) === 'undefined' ) {
</ins><span class="cx">                   return;
</span><ins>+               }
</ins><span class="cx"> 
</span><span class="cx">          fullscreen.on();
</span><span class="cx">  };
</span><span class="cx"> 
</span><span class="cx">  qt.TextDirectionButton = function() {
</span><del>-               qt.Button.call(this, 'textdirection', quicktagsL10n.textdirection, '', quicktagsL10n.toggleTextdirection)
</del><ins>+                qt.Button.call(this, 'textdirection', quicktagsL10n.textdirection, '', quicktagsL10n.toggleTextdirection);
</ins><span class="cx">   };
</span><span class="cx">  qt.TextDirectionButton.prototype = new qt.Button();
</span><span class="cx">  qt.TextDirectionButton.prototype.callback = function(e, c) {
</span><del>-               var isRTL = ( 'rtl' == document.getElementsByTagName('html')[0].dir ),
</del><ins>+                var isRTL = ( 'rtl' === document.getElementsByTagName('html')[0].dir ),
</ins><span class="cx">                   currentDirection = c.style.direction;
</span><span class="cx"> 
</span><del>-               if ( ! currentDirection )
</del><ins>+                if ( ! currentDirection ) {
</ins><span class="cx">                   currentDirection = ( isRTL ) ? 'rtl' : 'ltr';
</span><ins>+               }
</ins><span class="cx"> 
</span><del>-               c.style.direction = ( 'rtl' == currentDirection ) ? 'ltr' : 'rtl';
</del><ins>+                c.style.direction = ( 'rtl' === currentDirection ) ? 'ltr' : 'rtl';
</ins><span class="cx">           c.focus();
</span><del>-       }
</del><ins>+        };
</ins><span class="cx"> 
</span><span class="cx">  // ensure backward compatibility
</span><span class="cx">  edButtons[10] = new qt.TagButton('strong','b','<strong>','</strong>','b');
</span><span class="lines">@@ -615,6 +641,6 @@
</span><span class="cx">  edButtons[100] = new qt.TagButton('li','li','\t<li>','</li>\n','l'),
</span><span class="cx">  edButtons[110] = new qt.TagButton('code','code','<code>','</code>','c'),
</span><span class="cx">  edButtons[120] = new qt.TagButton('more','more','<!--more-->','','t'),
</span><del>-       edButtons[140] = new qt.CloseButton()
</del><ins>+        edButtons[140] = new qt.CloseButton();
</ins><span class="cx"> 
</span><span class="cx"> })();
</span></span></pre>
</div>
</div>

</body>
</html>