<!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>[18497] trunk: Refactor Quicktags, props garyc40, see #16695</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, #logmsg > ol { margin-left: 0; 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/18497">18497</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2011-08-03 10:11:12 +0000 (Wed, 03 Aug 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>Refactor Quicktags, props garyc40, see <a href="http://core.trac.wordpress.org/ticket/16695">#16695</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminjseditcommentsdevjs">trunk/wp-admin/js/edit-comments.dev.js</a></li>
<li><a href="#trunkwpadminjseditcommentsjs">trunk/wp-admin/js/edit-comments.js</a></li>
<li><a href="#trunkwpincludesjsquicktagsdevjs">trunk/wp-includes/js/quicktags.dev.js</a></li>
<li><a href="#trunkwpincludesjsquicktagsjs">trunk/wp-includes/js/quicktags.js</a></li>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminjseditcommentsdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/edit-comments.dev.js (18496 => 18497)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/edit-comments.dev.js        2011-08-03 01:54:29 UTC (rev 18496)
+++ trunk/wp-admin/js/edit-comments.dev.js        2011-08-03 10:11:12 UTC (rev 18497)
</span><span class="lines">@@ -548,8 +548,12 @@
</span><span class="cx">         commentReply.init();
</span><span class="cx">         $(document).delegate('span.delete a.delete', 'click', function(){return false;});
</span><span class="cx"> 
</span><del>-        if ( typeof QTags != 'undefined' )
-                ed_reply = new QTags('ed_reply', 'replycontent', 'replycontainer', 'more,fullscreen');
</del><ins>+        if ( typeof QTags != 'undefined' ) {
+                quicktags({quicktags_id: 'replycontent', quicktags_buttons: 'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close'});
+        
+        
+        console.debug('typeof QTags')
+        }
</ins><span class="cx"> 
</span><span class="cx">         if ( typeof $.table_hotkeys != 'undefined' ) {
</span><span class="cx">                 make_hotkeys_redirect = function(which) {
</span></span></pre></div>
<a id="trunkwpadminjseditcommentsjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/edit-comments.js (18496 => 18497)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/edit-comments.js        2011-08-03 01:54:29 UTC (rev 18496)
+++ trunk/wp-admin/js/edit-comments.js        2011-08-03 10:11:12 UTC (rev 18497)
</span><span class="lines">@@ -1 +1 @@
</span><del>-var theList,theExtraList,toggleWithKeyboard=false,getCount,updateCount,updatePending,dashboardTotals;(function(a){setCommentsList=function(){var c,e,g,j=0,f,h,d,i,b;c=a('input[name=&quot;_total&quot;]',&quot;#comments-form&quot;);e=a('input[name=&quot;_per_page&quot;]',&quot;#comments-form&quot;);g=a('input[name=&quot;_page&quot;]',&quot;#comments-form&quot;);f=function(n,l){var p=a(&quot;#&quot;+l.element),k,o,m;k=a(&quot;#replyrow&quot;);o=a(&quot;#comment_ID&quot;,k).val();m=a(&quot;#replybtn&quot;,k);if(p.is(&quot;.unapproved&quot;)){if(l.data.id==o){m.text(adminCommentsL10n.replyApprove)}p.find(&quot;div.comment_status&quot;).html(&quot;0&quot;)}else{if(l.data.id==o){m.text(adminCommentsL10n.reply)}p.find(&quot;div.comment_status&quot;).html(&quot;1&quot;)}a(&quot;span.pending-count&quot;).each(function(){var q=a(this),s,r;s=q.html().replace(/[^0-9]+/g,&quot;&quot;);s=parseInt(s,10);if(isNaN(s)){return}r=a(&quot;#&quot;+l.element).is(&quot;.&quot;+l.dimClass
 )?1:-1;s=s+r;if(s&lt;0){s=0}q.closest(&quot;.awaiting-mod&quot;)[0==s?&quot;addClass&quot;:&quot;removeClass&quot;](&quot;count-0&quot;);updateCount(q,s);dashboardTotals()})};h=function(o,s){var u=a(o.target).attr(&quot;class&quot;),k,l,m,r,t,q,p=false;o.data._total=c.val()||0;o.data._per_page=e.val()||0;o.data._page=g.val()||0;o.data._url=document.location.href;o.data.comment_status=a('input[name=&quot;comment_status&quot;]',&quot;#comments-form&quot;).val();if(u.indexOf(&quot;:trash=1&quot;)!=-1){p=&quot;trash&quot;}else{if(u.indexOf(&quot;:spam=1&quot;)!=-1){p=&quot;spam&quot;}}if(p){k=u.replace(/.*?comment-([0-9]+).*/,&quot;$1&quot;);l=a(&quot;#comment-&quot;+k);note=a(&quot;#&quot;+p+&quot;-undo-holder&quot;).html();l.find(&quot;.check-column :checkbox&quot;).prop(&quot;checked&quot;,false);if(l.siblings(&quot;#replyrow&quot;).length&amp;&amp;commentReply.cid==k){commentReply.close()}if(l.is(&quot;tr&quot;)){m=l.children(&quot;:visible&quot;).length;q=a(&quot;.author st
 rong&quot;,l).text();r=a('&lt;tr id=&quot;undo-'+k+'&quot; class=&quot;undo un'+p+'&quot; style=&quot;display:none;&quot;&gt;&lt;td colspan=&quot;'+m+'&quot;&gt;'+note+&quot;&lt;/td&gt;&lt;/tr&gt;&quot;)}else{q=a(&quot;.comment-author&quot;,l).text();r=a('&lt;div id=&quot;undo-'+k+'&quot; style=&quot;display:none;&quot; class=&quot;undo un'+p+'&quot;&gt;'+note+&quot;&lt;/div&gt;&quot;)}l.before(r);a(&quot;strong&quot;,&quot;#undo-&quot;+k).text(q+&quot; &quot;);t=a(&quot;.undo a&quot;,&quot;#undo-&quot;+k);t.attr(&quot;href&quot;,&quot;comment.php?action=un&quot;+p+&quot;comment&amp;c=&quot;+k+&quot;&amp;_wpnonce=&quot;+o.data._ajax_nonce);t.attr(&quot;class&quot;,&quot;delete:the-comment-list:comment-&quot;+k+&quot;::un&quot;+p+&quot;=1 vim-z vim-destructive&quot;);a(&quot;.avatar&quot;,l).clone().prependTo(&quot;#undo-&quot;+k+&quot; .&quot;+p+&quot;-undo-inside&quot;);t.click(function(){s.wpList.del(this);a(&quot;#undo-&quot;+k).css({backgroundColor:&quot;#ceb&quot;}).fad
 eOut(350,function(){a(this).remove();a(&quot;#comment-&quot;+k).css(&quot;backgroundColor&quot;,&quot;&quot;).fadeIn(300,function(){a(this).show()})});return false})}return o};d=function(k,l,m){if(l&lt;j){return}if(m){j=l}c.val(k.toString());a(&quot;span.total-type-count&quot;).each(function(){updateCount(a(this),k)})};dashboardTotals=function(q){var p=a(&quot;#dashboard_right_now&quot;),l,o,m,k;q=q||0;if(isNaN(q)||!p.length){return}l=a(&quot;span.total-count&quot;,p);o=a(&quot;span.approved-count&quot;,p);m=getCount(l);m=m+q;k=m-getCount(a(&quot;span.pending-count&quot;,p))-getCount(a(&quot;span.spam-count&quot;,p));updateCount(l,m);updateCount(o,k)};getCount=function(k){var l=parseInt(k.html().replace(/[^0-9]+/g,&quot;&quot;),10);if(isNaN(l)){return 0}return l};updateCount=function(l,m){var k=&quot;&quot;;if(isNaN(m)){return}m=m&lt;1?&quot;0&quot;:m.toString();if(m.length&gt;3){while(m.length&gt;3){k=thousandsSeparator+m.substr(m.length-3)+k;m=m.substr(0,m.length-3)}m=m+k}
 l.html(m)};updatePending=function(k){a(&quot;span.pending-count&quot;).each(function(){var l=a(this);if(k&lt;0){k=0}l.closest(&quot;.awaiting-mod&quot;)[0==k?&quot;addClass&quot;:&quot;removeClass&quot;](&quot;count-0&quot;);updateCount(l,k);dashboardTotals()})};i=function(k,n){var q,o,u=a(n.target).parent().is(&quot;span.untrash&quot;),m=a(n.target).parent().is(&quot;span.unspam&quot;),t,s,l,p=a(&quot;#&quot;+n.element).is(&quot;.unapproved&quot;);function v(r){if(a(n.target).parent().is(&quot;span.&quot;+r)){return 1}else{if(a(&quot;#&quot;+n.element).is(&quot;.&quot;+r)){return -1}}return 0}t=v(&quot;spam&quot;);s=v(&quot;trash&quot;);if(u){s=-1}if(m){t=-1}l=getCount(a(&quot;span.pending-count&quot;).eq(0));if(a(n.target).parent().is(&quot;span.unapprove&quot;)||((u||m)&amp;&amp;p)){l=l+1}else{if(p){l=l-1}}updatePending(l);a(&quot;span.spam-count&quot;).each(function(){var r=a(this),w=getCount(r)+t;updateCount(r,w)});a(&quot;span.trash-count&quot;).each(function(){var r=a
 (this),w=getCount(r)+s;updateCount(r,w)});if(a(&quot;#dashboard_right_now&quot;).length){o=s?-1*s:0;dashboardTotals(o)}else{q=c.val()?parseInt(c.val(),10):0;q=q-t-s;if(q&lt;0){q=0}if((&quot;object&quot;==typeof k)&amp;&amp;j&lt;n.parsed.responses[0].supplemental.time){total_items_i18n=n.parsed.responses[0].supplemental.total_items_i18n||&quot;&quot;;if(total_items_i18n){a(&quot;.displaying-num&quot;).text(total_items_i18n);a(&quot;.total-pages&quot;).text(n.parsed.responses[0].supplemental.total_pages_i18n);a(&quot;.tablenav-pages&quot;).find(&quot;.next-page, .last-page&quot;).toggleClass(&quot;disabled&quot;,n.parsed.responses[0].supplemental.total_pages==a(&quot;.current-page&quot;).val())}d(q,n.parsed.responses[0].supplemental.time,true)}else{d(q,k,false)}}if(!theExtraList||theExtraList.size()==0||theExtraList.children().size()==0||u||m){return}theList.get(0).wpList.add(theExtraList.children(&quot;:eq(0)&quot;).remove().clone());b()};b=function(n){var l=a.query.get(),k=a
 (&quot;.total-pages&quot;).text(),m=a('input[name=&quot;_per_page&quot;]',&quot;#comments-form&quot;).val();if(!l.paged){l.paged=1}if(l.paged&gt;k){return}if(n){theExtraList.empty();l.number=Math.min(8,m)}else{l.number=1;l.offset=Math.min(8,m)-1}l.no_placeholder=true;l.paged++;if(true===l.comment_type){l.comment_type=&quot;&quot;}l=a.extend(l,{action:&quot;fetch-list&quot;,list_args:list_args,_ajax_fetch_list_nonce:a(&quot;#_ajax_fetch_list_nonce&quot;).val()});a.ajax({url:ajaxurl,global:false,dataType:&quot;json&quot;,data:l,success:function(o){theExtraList.get(0).wpList.add(o.rows)}})};theExtraList=a(&quot;#the-extra-comment-list&quot;).wpList({alt:&quot;&quot;,delColor:&quot;none&quot;,addColor:&quot;none&quot;});theList=a(&quot;#the-comment-list&quot;).wpList({alt:&quot;&quot;,delBefore:h,dimAfter:f,delAfter:i,addColor:&quot;none&quot;}).bind(&quot;wpListDelEnd&quot;,function(l,k){var m=k.element.replace(/[^0-9]+/g,&quot;&quot;);if(k.target.className.indexOf(&quot;:trash
 =1&quot;)!=-1||k.target.className.indexOf(&quot;:spam=1&quot;)!=-1){a(&quot;#undo-&quot;+m).fadeIn(300,function(){a(this).show()})}})};commentReply={cid:&quot;&quot;,act:&quot;&quot;,init:function(){var b=a(&quot;#replyrow&quot;);a(&quot;a.cancel&quot;,b).click(function(){return commentReply.revert()});a(&quot;a.save&quot;,b).click(function(){return commentReply.send()});a(&quot;input#author, input#author-email, input#author-url&quot;,b).keypress(function(c){if(c.which==13){commentReply.send();c.preventDefault();return false}});a(&quot;#the-comment-list .column-comment &gt; p&quot;).dblclick(function(){commentReply.toggle(a(this).parent())});a(&quot;#doaction, #doaction2, #post-query-submit&quot;).click(function(c){if(a(&quot;#the-comment-list #replyrow&quot;).length&gt;0){commentReply.close()}});this.comments_listing=a('#comments-form &gt; input[name=&quot;comment_status&quot;]').val()||&quot;&quot;},addEvents:function(b){b.each(function(){a(this).find(&quot;.column-comment
  &gt; p&quot;).dblclick(function(){commentReply.toggle(a(this).parent())})})},toggle:function(b){if(a(b).css(&quot;display&quot;)!=&quot;none&quot;){a(b).find(&quot;a.vim-q&quot;).click()}},revert:function(){if(a(&quot;#the-comment-list #replyrow&quot;).length&lt;1){return false}a(&quot;#replyrow&quot;).fadeOut(&quot;fast&quot;,function(){commentReply.close()});return false},close:function(){var b;if(this.cid){b=a(&quot;#comment-&quot;+this.cid);if(this.act==&quot;edit-comment&quot;){b.fadeIn(300,function(){b.show()}).css(&quot;backgroundColor&quot;,&quot;&quot;)}a(&quot;#replyrow&quot;).hide();a(&quot;#com-reply&quot;).append(a(&quot;#replyrow&quot;));a(&quot;#replycontent&quot;).val(&quot;&quot;);a(&quot;input&quot;,&quot;#edithead&quot;).val(&quot;&quot;);a(&quot;.error&quot;,&quot;#replysubmit&quot;).html(&quot;&quot;).hide();a(&quot;.waiting&quot;,&quot;#replysubmit&quot;).hide();if(a.browser.msie){a(&quot;#replycontainer, #replycontent&quot;).css(&quot;height&quot;,&qu
 ot;120px&quot;)}else{a(&quot;#replycontainer&quot;).resizable(&quot;destroy&quot;).css(&quot;height&quot;,&quot;120px&quot;)}this.cid=&quot;&quot;}},open:function(b,d,k){var m=this,e,f,i,g,j=a(&quot;#comment-&quot;+b),l;m.close();m.cid=b;e=a(&quot;#replyrow&quot;);f=a(&quot;#inline-&quot;+b);i=m.act=(k==&quot;edit&quot;)?&quot;edit-comment&quot;:&quot;replyto-comment&quot;;a(&quot;#action&quot;,e).val(i);a(&quot;#comment_post_ID&quot;,e).val(d);a(&quot;#comment_ID&quot;,e).val(b);if(k==&quot;edit&quot;){a(&quot;#author&quot;,e).val(a(&quot;div.author&quot;,f).text());a(&quot;#author-email&quot;,e).val(a(&quot;div.author-email&quot;,f).text());a(&quot;#author-url&quot;,e).val(a(&quot;div.author-url&quot;,f).text());a(&quot;#status&quot;,e).val(a(&quot;div.comment_status&quot;,f).text());a(&quot;#replycontent&quot;,e).val(a(&quot;textarea.comment&quot;,f).val());a(&quot;#edithead, #savebtn&quot;,e).show();a(&quot;#replyhead, #replybtn&quot;,e).hide();g=j.height();if(g&gt;220){
 if(a.browser.msie){a(&quot;#replycontainer, #replycontent&quot;,e).height(g-105)}else{a(&quot;#replycontainer&quot;,e).height(g-105)}}j.after(e).fadeOut(&quot;fast&quot;,function(){a(&quot;#replyrow&quot;).fadeIn(300,function(){a(this).show()})})}else{l=a(&quot;#replybtn&quot;,e);a(&quot;#edithead, #savebtn&quot;,e).hide();a(&quot;#replyhead, #replybtn&quot;,e).show();j.after(e);if(j.hasClass(&quot;unapproved&quot;)){l.text(adminCommentsL10n.replyApprove)}else{l.text(adminCommentsL10n.reply)}a(&quot;#replyrow&quot;).fadeIn(300,function(){a(this).show()})}setTimeout(function(){var o,h,p,c,n;o=a(&quot;#replyrow&quot;).offset().top;h=o+a(&quot;#replyrow&quot;).height();p=window.pageYOffset||document.documentElement.scrollTop;c=document.documentElement.clientHeight||self.innerHeight||0;n=p+c;if(n-20&lt;h){window.scroll(0,h-c+35)}else{if(o-20&lt;p){window.scroll(0,o-35)}}a(&quot;#replycontent&quot;).focus().keyup(function(q){if(q.which==27){commentReply.revert()}})},600);return f
 alse},send:function(){var b={};a(&quot;#replysubmit .error&quot;).hide();a(&quot;#replysubmit .waiting&quot;).show();a(&quot;#replyrow input&quot;).not(&quot;:button&quot;).each(function(){b[a(this).attr(&quot;name&quot;)]=a(this).val()});b.content=a(&quot;#replycontent&quot;).val();b.id=b.comment_post_ID;b.comments_listing=this.comments_listing;b.p=a('[name=&quot;p&quot;]').val();if(a(&quot;#comment-&quot;+a(&quot;#comment_ID&quot;).val()).hasClass(&quot;unapproved&quot;)){b.approve_parent=1}a.ajax({type:&quot;POST&quot;,url:ajaxurl,data:b,success:function(c){commentReply.show(c)},error:function(c){commentReply.error(c)}});return false},show:function(d){var f=this,g,i,h,e,b;f.revert();if(typeof(d)==&quot;string&quot;){f.error({responseText:d});return false}g=wpAjax.parseAjaxResponse(d);if(g.errors){f.error({responseText:wpAjax.broken});return false}g=g.responses[0];i=g.data;h=&quot;#comment-&quot;+g.id;if(&quot;edit-comment&quot;==f.act){a(h).remove()}if(g.supplemental.pare
 nt_approved){b=a(&quot;#comment-&quot;+g.supplemental.parent_approved);updatePending(getCount(a(&quot;span.pending-count&quot;).eq(0))-1);if(this.comments_listing==&quot;moderated&quot;){b.animate({backgroundColor:&quot;#CCEEBB&quot;},400,function(){b.fadeOut()});return}}a(i).hide();a(&quot;#replyrow&quot;).after(i);h=a(h);f.addEvents(h);e=h.hasClass(&quot;unapproved&quot;)?&quot;#FFFFE0&quot;:h.closest(&quot;.widefat&quot;).css(&quot;backgroundColor&quot;);h.animate({backgroundColor:&quot;#CCEEBB&quot;},300).animate({backgroundColor:e},300,function(){if(b&amp;&amp;b.length){b.animate({backgroundColor:&quot;#CCEEBB&quot;},300).animate({backgroundColor:e},300).removeClass(&quot;unapproved&quot;).addClass(&quot;approved&quot;).find(&quot;div.comment_status&quot;).html(&quot;1&quot;)}})},error:function(b){var c=b.statusText;a(&quot;#replysubmit .waiting&quot;).hide();if(b.responseText){c=b.responseText.replace(/&lt;.[^&lt;&gt;]*?&gt;/g,&quot;&quot;)}if(c){a(&quot;#replysubmit .
 error&quot;).html(c).show()}}};a(document).ready(function(){var e,b,c,d;setCommentsList();commentReply.init();a(document).delegate(&quot;span.delete a.delete&quot;,&quot;click&quot;,function(){return false});if(typeof QTags!=&quot;undefined&quot;){ed_reply=new QTags(&quot;ed_reply&quot;,&quot;replycontent&quot;,&quot;replycontainer&quot;,&quot;more,fullscreen&quot;)}if(typeof a.table_hotkeys!=&quot;undefined&quot;){e=function(f){return function(){var h,g;h=&quot;next&quot;==f?&quot;first&quot;:&quot;last&quot;;g=a(&quot;.tablenav-pages .&quot;+f+&quot;-page:not(.disabled)&quot;);if(g.length){window.location=g[0].href.replace(/\&amp;hotkeys_highlight_(first|last)=1/g,&quot;&quot;)+&quot;&amp;hotkeys_highlight_&quot;+h+&quot;=1&quot;}}};b=function(g,f){window.location=a(&quot;span.edit a&quot;,f).attr(&quot;href&quot;)};c=function(){toggleWithKeyboard=true;a(&quot;input:checkbox&quot;,&quot;#cb&quot;).click().prop(&quot;checked&quot;,false);toggleWithKeyboard=false};d=function
 (f){return function(){var g=a('select[name=&quot;action&quot;]');a('option[value=&quot;'+f+'&quot;]',g).prop(&quot;selected&quot;,true);a(&quot;#doaction&quot;).click()}};a.table_hotkeys(a(&quot;table.widefat&quot;),[&quot;a&quot;,&quot;u&quot;,&quot;s&quot;,&quot;d&quot;,&quot;r&quot;,&quot;q&quot;,&quot;z&quot;,[&quot;e&quot;,b],[&quot;shift+x&quot;,c],[&quot;shift+a&quot;,d(&quot;approve&quot;)],[&quot;shift+s&quot;,d(&quot;spam&quot;)],[&quot;shift+d&quot;,d(&quot;delete&quot;)],[&quot;shift+t&quot;,d(&quot;trash&quot;)],[&quot;shift+z&quot;,d(&quot;untrash&quot;)],[&quot;shift+u&quot;,d(&quot;unapprove&quot;)]],{highlight_first:adminCommentsL10n.hotkeys_highlight_first,highlight_last:adminCommentsL10n.hotkeys_highlight_last,prev_page_link_cb:e(&quot;prev&quot;),next_page_link_cb:e(&quot;next&quot;)})}})})(jQuery);
</del><span class="cx">\ No newline at end of file
</span><ins>+var theList,theExtraList,toggleWithKeyboard=false,getCount,updateCount,updatePending,dashboardTotals;(function(a){setCommentsList=function(){var c,e,g,j=0,f,h,d,i,b;c=a('input[name=&quot;_total&quot;]',&quot;#comments-form&quot;);e=a('input[name=&quot;_per_page&quot;]',&quot;#comments-form&quot;);g=a('input[name=&quot;_page&quot;]',&quot;#comments-form&quot;);f=function(n,l){var p=a(&quot;#&quot;+l.element),k,o,m;k=a(&quot;#replyrow&quot;);o=a(&quot;#comment_ID&quot;,k).val();m=a(&quot;#replybtn&quot;,k);if(p.is(&quot;.unapproved&quot;)){if(l.data.id==o){m.text(adminCommentsL10n.replyApprove)}p.find(&quot;div.comment_status&quot;).html(&quot;0&quot;)}else{if(l.data.id==o){m.text(adminCommentsL10n.reply)}p.find(&quot;div.comment_status&quot;).html(&quot;1&quot;)}a(&quot;span.pending-count&quot;).each(function(){var q=a(this),s,r;s=q.html().replace(/[^0-9]+/g,&quot;&quot;);s=parseInt(s,10);if(isNaN(s)){return}r=a(&quot;#&quot;+l.element).is(&quot;.&quot;+l.dimClass
 )?1:-1;s=s+r;if(s&lt;0){s=0}q.closest(&quot;.awaiting-mod&quot;)[0==s?&quot;addClass&quot;:&quot;removeClass&quot;](&quot;count-0&quot;);updateCount(q,s);dashboardTotals()})};h=function(o,s){var u=a(o.target).attr(&quot;class&quot;),k,l,m,r,t,q,p=false;o.data._total=c.val()||0;o.data._per_page=e.val()||0;o.data._page=g.val()||0;o.data._url=document.location.href;o.data.comment_status=a('input[name=&quot;comment_status&quot;]',&quot;#comments-form&quot;).val();if(u.indexOf(&quot;:trash=1&quot;)!=-1){p=&quot;trash&quot;}else{if(u.indexOf(&quot;:spam=1&quot;)!=-1){p=&quot;spam&quot;}}if(p){k=u.replace(/.*?comment-([0-9]+).*/,&quot;$1&quot;);l=a(&quot;#comment-&quot;+k);note=a(&quot;#&quot;+p+&quot;-undo-holder&quot;).html();l.find(&quot;.check-column :checkbox&quot;).prop(&quot;checked&quot;,false);if(l.siblings(&quot;#replyrow&quot;).length&amp;&amp;commentReply.cid==k){commentReply.close()}if(l.is(&quot;tr&quot;)){m=l.children(&quot;:visible&quot;).length;q=a(&quot;.author st
 rong&quot;,l).text();r=a('&lt;tr id=&quot;undo-'+k+'&quot; class=&quot;undo un'+p+'&quot; style=&quot;display:none;&quot;&gt;&lt;td colspan=&quot;'+m+'&quot;&gt;'+note+&quot;&lt;/td&gt;&lt;/tr&gt;&quot;)}else{q=a(&quot;.comment-author&quot;,l).text();r=a('&lt;div id=&quot;undo-'+k+'&quot; style=&quot;display:none;&quot; class=&quot;undo un'+p+'&quot;&gt;'+note+&quot;&lt;/div&gt;&quot;)}l.before(r);a(&quot;strong&quot;,&quot;#undo-&quot;+k).text(q+&quot; &quot;);t=a(&quot;.undo a&quot;,&quot;#undo-&quot;+k);t.attr(&quot;href&quot;,&quot;comment.php?action=un&quot;+p+&quot;comment&amp;c=&quot;+k+&quot;&amp;_wpnonce=&quot;+o.data._ajax_nonce);t.attr(&quot;class&quot;,&quot;delete:the-comment-list:comment-&quot;+k+&quot;::un&quot;+p+&quot;=1 vim-z vim-destructive&quot;);a(&quot;.avatar&quot;,l).clone().prependTo(&quot;#undo-&quot;+k+&quot; .&quot;+p+&quot;-undo-inside&quot;);t.click(function(){s.wpList.del(this);a(&quot;#undo-&quot;+k).css({backgroundColor:&quot;#ceb&quot;}).fad
 eOut(350,function(){a(this).remove();a(&quot;#comment-&quot;+k).css(&quot;backgroundColor&quot;,&quot;&quot;).fadeIn(300,function(){a(this).show()})});return false})}return o};d=function(k,l,m){if(l&lt;j){return}if(m){j=l}c.val(k.toString());a(&quot;span.total-type-count&quot;).each(function(){updateCount(a(this),k)})};dashboardTotals=function(q){var p=a(&quot;#dashboard_right_now&quot;),l,o,m,k;q=q||0;if(isNaN(q)||!p.length){return}l=a(&quot;span.total-count&quot;,p);o=a(&quot;span.approved-count&quot;,p);m=getCount(l);m=m+q;k=m-getCount(a(&quot;span.pending-count&quot;,p))-getCount(a(&quot;span.spam-count&quot;,p));updateCount(l,m);updateCount(o,k)};getCount=function(k){var l=parseInt(k.html().replace(/[^0-9]+/g,&quot;&quot;),10);if(isNaN(l)){return 0}return l};updateCount=function(l,m){var k=&quot;&quot;;if(isNaN(m)){return}m=m&lt;1?&quot;0&quot;:m.toString();if(m.length&gt;3){while(m.length&gt;3){k=thousandsSeparator+m.substr(m.length-3)+k;m=m.substr(0,m.length-3)}m=m+k}
 l.html(m)};updatePending=function(k){a(&quot;span.pending-count&quot;).each(function(){var l=a(this);if(k&lt;0){k=0}l.closest(&quot;.awaiting-mod&quot;)[0==k?&quot;addClass&quot;:&quot;removeClass&quot;](&quot;count-0&quot;);updateCount(l,k);dashboardTotals()})};i=function(k,n){var q,o,u=a(n.target).parent().is(&quot;span.untrash&quot;),m=a(n.target).parent().is(&quot;span.unspam&quot;),t,s,l,p=a(&quot;#&quot;+n.element).is(&quot;.unapproved&quot;);function v(r){if(a(n.target).parent().is(&quot;span.&quot;+r)){return 1}else{if(a(&quot;#&quot;+n.element).is(&quot;.&quot;+r)){return -1}}return 0}t=v(&quot;spam&quot;);s=v(&quot;trash&quot;);if(u){s=-1}if(m){t=-1}l=getCount(a(&quot;span.pending-count&quot;).eq(0));if(a(n.target).parent().is(&quot;span.unapprove&quot;)||((u||m)&amp;&amp;p)){l=l+1}else{if(p){l=l-1}}updatePending(l);a(&quot;span.spam-count&quot;).each(function(){var r=a(this),w=getCount(r)+t;updateCount(r,w)});a(&quot;span.trash-count&quot;).each(function(){var r=a
 (this),w=getCount(r)+s;updateCount(r,w)});if(a(&quot;#dashboard_right_now&quot;).length){o=s?-1*s:0;dashboardTotals(o)}else{q=c.val()?parseInt(c.val(),10):0;q=q-t-s;if(q&lt;0){q=0}if((&quot;object&quot;==typeof k)&amp;&amp;j&lt;n.parsed.responses[0].supplemental.time){total_items_i18n=n.parsed.responses[0].supplemental.total_items_i18n||&quot;&quot;;if(total_items_i18n){a(&quot;.displaying-num&quot;).text(total_items_i18n);a(&quot;.total-pages&quot;).text(n.parsed.responses[0].supplemental.total_pages_i18n);a(&quot;.tablenav-pages&quot;).find(&quot;.next-page, .last-page&quot;).toggleClass(&quot;disabled&quot;,n.parsed.responses[0].supplemental.total_pages==a(&quot;.current-page&quot;).val())}d(q,n.parsed.responses[0].supplemental.time,true)}else{d(q,k,false)}}if(!theExtraList||theExtraList.size()==0||theExtraList.children().size()==0||u||m){return}theList.get(0).wpList.add(theExtraList.children(&quot;:eq(0)&quot;).remove().clone());b()};b=function(n){var l=a.query.get(),k=a
 (&quot;.total-pages&quot;).text(),m=a('input[name=&quot;_per_page&quot;]',&quot;#comments-form&quot;).val();if(!l.paged){l.paged=1}if(l.paged&gt;k){return}if(n){theExtraList.empty();l.number=Math.min(8,m)}else{l.number=1;l.offset=Math.min(8,m)-1}l.no_placeholder=true;l.paged++;if(true===l.comment_type){l.comment_type=&quot;&quot;}l=a.extend(l,{action:&quot;fetch-list&quot;,list_args:list_args,_ajax_fetch_list_nonce:a(&quot;#_ajax_fetch_list_nonce&quot;).val()});a.ajax({url:ajaxurl,global:false,dataType:&quot;json&quot;,data:l,success:function(o){theExtraList.get(0).wpList.add(o.rows)}})};theExtraList=a(&quot;#the-extra-comment-list&quot;).wpList({alt:&quot;&quot;,delColor:&quot;none&quot;,addColor:&quot;none&quot;});theList=a(&quot;#the-comment-list&quot;).wpList({alt:&quot;&quot;,delBefore:h,dimAfter:f,delAfter:i,addColor:&quot;none&quot;}).bind(&quot;wpListDelEnd&quot;,function(l,k){var m=k.element.replace(/[^0-9]+/g,&quot;&quot;);if(k.target.className.indexOf(&quot;:trash
 =1&quot;)!=-1||k.target.className.indexOf(&quot;:spam=1&quot;)!=-1){a(&quot;#undo-&quot;+m).fadeIn(300,function(){a(this).show()})}})};commentReply={cid:&quot;&quot;,act:&quot;&quot;,init:function(){var b=a(&quot;#replyrow&quot;);a(&quot;a.cancel&quot;,b).click(function(){return commentReply.revert()});a(&quot;a.save&quot;,b).click(function(){return commentReply.send()});a(&quot;input#author, input#author-email, input#author-url&quot;,b).keypress(function(c){if(c.which==13){commentReply.send();c.preventDefault();return false}});a(&quot;#the-comment-list .column-comment &gt; p&quot;).dblclick(function(){commentReply.toggle(a(this).parent())});a(&quot;#doaction, #doaction2, #post-query-submit&quot;).click(function(c){if(a(&quot;#the-comment-list #replyrow&quot;).length&gt;0){commentReply.close()}});this.comments_listing=a('#comments-form &gt; input[name=&quot;comment_status&quot;]').val()||&quot;&quot;},addEvents:function(b){b.each(function(){a(this).find(&quot;.column-comment
  &gt; p&quot;).dblclick(function(){commentReply.toggle(a(this).parent())})})},toggle:function(b){if(a(b).css(&quot;display&quot;)!=&quot;none&quot;){a(b).find(&quot;a.vim-q&quot;).click()}},revert:function(){if(a(&quot;#the-comment-list #replyrow&quot;).length&lt;1){return false}a(&quot;#replyrow&quot;).fadeOut(&quot;fast&quot;,function(){commentReply.close()});return false},close:function(){var b;if(this.cid){b=a(&quot;#comment-&quot;+this.cid);if(this.act==&quot;edit-comment&quot;){b.fadeIn(300,function(){b.show()}).css(&quot;backgroundColor&quot;,&quot;&quot;)}a(&quot;#replyrow&quot;).hide();a(&quot;#com-reply&quot;).append(a(&quot;#replyrow&quot;));a(&quot;#replycontent&quot;).val(&quot;&quot;);a(&quot;input&quot;,&quot;#edithead&quot;).val(&quot;&quot;);a(&quot;.error&quot;,&quot;#replysubmit&quot;).html(&quot;&quot;).hide();a(&quot;.waiting&quot;,&quot;#replysubmit&quot;).hide();if(a.browser.msie){a(&quot;#replycontainer, #replycontent&quot;).css(&quot;height&quot;,&qu
 ot;120px&quot;)}else{a(&quot;#replycontainer&quot;).resizable(&quot;destroy&quot;).css(&quot;height&quot;,&quot;120px&quot;)}this.cid=&quot;&quot;}},open:function(b,d,k){var m=this,e,f,i,g,j=a(&quot;#comment-&quot;+b),l;m.close();m.cid=b;e=a(&quot;#replyrow&quot;);f=a(&quot;#inline-&quot;+b);i=m.act=(k==&quot;edit&quot;)?&quot;edit-comment&quot;:&quot;replyto-comment&quot;;a(&quot;#action&quot;,e).val(i);a(&quot;#comment_post_ID&quot;,e).val(d);a(&quot;#comment_ID&quot;,e).val(b);if(k==&quot;edit&quot;){a(&quot;#author&quot;,e).val(a(&quot;div.author&quot;,f).text());a(&quot;#author-email&quot;,e).val(a(&quot;div.author-email&quot;,f).text());a(&quot;#author-url&quot;,e).val(a(&quot;div.author-url&quot;,f).text());a(&quot;#status&quot;,e).val(a(&quot;div.comment_status&quot;,f).text());a(&quot;#replycontent&quot;,e).val(a(&quot;textarea.comment&quot;,f).val());a(&quot;#edithead, #savebtn&quot;,e).show();a(&quot;#replyhead, #replybtn&quot;,e).hide();g=j.height();if(g&gt;220){
 if(a.browser.msie){a(&quot;#replycontainer, #replycontent&quot;,e).height(g-105)}else{a(&quot;#replycontainer&quot;,e).height(g-105)}}j.after(e).fadeOut(&quot;fast&quot;,function(){a(&quot;#replyrow&quot;).fadeIn(300,function(){a(this).show()})})}else{l=a(&quot;#replybtn&quot;,e);a(&quot;#edithead, #savebtn&quot;,e).hide();a(&quot;#replyhead, #replybtn&quot;,e).show();j.after(e);if(j.hasClass(&quot;unapproved&quot;)){l.text(adminCommentsL10n.replyApprove)}else{l.text(adminCommentsL10n.reply)}a(&quot;#replyrow&quot;).fadeIn(300,function(){a(this).show()})}setTimeout(function(){var o,h,p,c,n;o=a(&quot;#replyrow&quot;).offset().top;h=o+a(&quot;#replyrow&quot;).height();p=window.pageYOffset||document.documentElement.scrollTop;c=document.documentElement.clientHeight||self.innerHeight||0;n=p+c;if(n-20&lt;h){window.scroll(0,h-c+35)}else{if(o-20&lt;p){window.scroll(0,o-35)}}a(&quot;#replycontent&quot;).focus().keyup(function(q){if(q.which==27){commentReply.revert()}})},600);return f
 alse},send:function(){var b={};a(&quot;#replysubmit .error&quot;).hide();a(&quot;#replysubmit .waiting&quot;).show();a(&quot;#replyrow input&quot;).not(&quot;:button&quot;).each(function(){b[a(this).attr(&quot;name&quot;)]=a(this).val()});b.content=a(&quot;#replycontent&quot;).val();b.id=b.comment_post_ID;b.comments_listing=this.comments_listing;b.p=a('[name=&quot;p&quot;]').val();if(a(&quot;#comment-&quot;+a(&quot;#comment_ID&quot;).val()).hasClass(&quot;unapproved&quot;)){b.approve_parent=1}a.ajax({type:&quot;POST&quot;,url:ajaxurl,data:b,success:function(c){commentReply.show(c)},error:function(c){commentReply.error(c)}});return false},show:function(d){var f=this,g,i,h,e,b;f.revert();if(typeof(d)==&quot;string&quot;){f.error({responseText:d});return false}g=wpAjax.parseAjaxResponse(d);if(g.errors){f.error({responseText:wpAjax.broken});return false}g=g.responses[0];i=g.data;h=&quot;#comment-&quot;+g.id;if(&quot;edit-comment&quot;==f.act){a(h).remove()}if(g.supplemental.pare
 nt_approved){b=a(&quot;#comment-&quot;+g.supplemental.parent_approved);updatePending(getCount(a(&quot;span.pending-count&quot;).eq(0))-1);if(this.comments_listing==&quot;moderated&quot;){b.animate({backgroundColor:&quot;#CCEEBB&quot;},400,function(){b.fadeOut()});return}}a(i).hide();a(&quot;#replyrow&quot;).after(i);h=a(h);f.addEvents(h);e=h.hasClass(&quot;unapproved&quot;)?&quot;#FFFFE0&quot;:h.closest(&quot;.widefat&quot;).css(&quot;backgroundColor&quot;);h.animate({backgroundColor:&quot;#CCEEBB&quot;},300).animate({backgroundColor:e},300,function(){if(b&amp;&amp;b.length){b.animate({backgroundColor:&quot;#CCEEBB&quot;},300).animate({backgroundColor:e},300).removeClass(&quot;unapproved&quot;).addClass(&quot;approved&quot;).find(&quot;div.comment_status&quot;).html(&quot;1&quot;)}})},error:function(b){var c=b.statusText;a(&quot;#replysubmit .waiting&quot;).hide();if(b.responseText){c=b.responseText.replace(/&lt;.[^&lt;&gt;]*?&gt;/g,&quot;&quot;)}if(c){a(&quot;#replysubmit .
 error&quot;).html(c).show()}}};a(document).ready(function(){var e,b,c,d;setCommentsList();commentReply.init();a(document).delegate(&quot;span.delete a.delete&quot;,&quot;click&quot;,function(){return false});if(typeof QTags!=&quot;undefined&quot;){quicktags({quicktags_id:&quot;replycontent&quot;,quicktags_buttons:&quot;strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close&quot;});console.debug(&quot;typeof QTags&quot;)}if(typeof a.table_hotkeys!=&quot;undefined&quot;){e=function(f){return function(){var h,g;h=&quot;next&quot;==f?&quot;first&quot;:&quot;last&quot;;g=a(&quot;.tablenav-pages .&quot;+f+&quot;-page:not(.disabled)&quot;);if(g.length){window.location=g[0].href.replace(/\&amp;hotkeys_highlight_(first|last)=1/g,&quot;&quot;)+&quot;&amp;hotkeys_highlight_&quot;+h+&quot;=1&quot;}}};b=function(g,f){window.location=a(&quot;span.edit a&quot;,f).attr(&quot;href&quot;)};c=function(){toggleWithKeyboard=true;a(&quot;input:checkbox&quot;,&quot;#cb&quot;).click().prop(&quo
 t;checked&quot;,false);toggleWithKeyboard=false};d=function(f){return function(){var g=a('select[name=&quot;action&quot;]');a('option[value=&quot;'+f+'&quot;]',g).prop(&quot;selected&quot;,true);a(&quot;#doaction&quot;).click()}};a.table_hotkeys(a(&quot;table.widefat&quot;),[&quot;a&quot;,&quot;u&quot;,&quot;s&quot;,&quot;d&quot;,&quot;r&quot;,&quot;q&quot;,&quot;z&quot;,[&quot;e&quot;,b],[&quot;shift+x&quot;,c],[&quot;shift+a&quot;,d(&quot;approve&quot;)],[&quot;shift+s&quot;,d(&quot;spam&quot;)],[&quot;shift+d&quot;,d(&quot;delete&quot;)],[&quot;shift+t&quot;,d(&quot;trash&quot;)],[&quot;shift+z&quot;,d(&quot;untrash&quot;)],[&quot;shift+u&quot;,d(&quot;unapprove&quot;)]],{highlight_first:adminCommentsL10n.hotkeys_highlight_first,highlight_last:adminCommentsL10n.hotkeys_highlight_last,prev_page_link_cb:e(&quot;prev&quot;),next_page_link_cb:e(&quot;next&quot;)})}})})(jQuery);
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesjsquicktagsdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/quicktags.dev.js (18496 => 18497)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/quicktags.dev.js        2011-08-03 01:54:29 UTC (rev 18496)
+++ trunk/wp-includes/js/quicktags.dev.js        2011-08-03 10:11:12 UTC (rev 18497)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+/*
+ * Quicktags
+ * 
+ * This is the HTML editor in WordPress. It can be attached to any textarea and will
+ * append a toolbar above it. This script is self-contained (does not require external libraries).
+ *
+ * Run quicktags(settings) to initialize it, where settings is an object containing up to 3 properties:
+ * settings = {
+ *   quicktags_id: 'myid', // required
+ *   buttons: '', // optional
+ *   disabled_buttons: '' // optional
+ * }
+ *
+ * The settings can also be a string quicktags_id.
+ *
+ * quicktags_id The ID of the textarea that will be the editor canvas
+ * buttons Comma separated list of the buttons IDs that will be shown. Buttons added by plugins
+ * will not show. Default: 'strong,em,link,block,del,ins,img,ul,ol,li,code,more,spell,close'
+ * disabled_buttons Comma separated list of the buttons IDs that should be excluded. Buttons
+ * added by plugins will show unless specifically disabled.
+ */
+
</ins><span class="cx"> // new edit toolbar used with permission
</span><span class="cx"> // by Alex King
</span><span class="cx"> // http://www.alexking.org/
</span><span class="lines">@@ -2,579 +24,464 @@
</span><span class="cx"> 
</span><del>-var edButtons = new Array(), edLinks = new Array(), edOpenTags = new Array(), now = new Date(), datetime;
</del><ins>+var QTags, edButtons, edButton;
</ins><span class="cx"> 
</span><del>-function edButton(id, display, tagStart, tagEnd, access, open) {
-        this.id = id;                                // used to name the toolbar button
-        this.display = display;                // label on button
-        this.tagStart = tagStart;         // open tag
-        this.tagEnd = tagEnd;                // close tag
-        this.access = access;                // access key
-        this.open = open;                        // set to -1 if tag does not need to be closed
</del><ins>+function quicktags(settings) {
+        return new QTags(settings);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-function zeroise(number, threshold) {
-        // FIXME: or we could use an implementation of printf in js here
-        var str = number.toString();
-        if (number &lt; 0) { str = str.substr(1, str.length) }
-        while (str.length &lt; threshold) { str = &quot;0&quot; + str }
-        if (number &lt; 0) { str = '-' + str }
-        return str;
-}
</del><ins>+(function(){
+        // private stuff is prefixed with an underscore
+        var _domReady = function(func) {
+                var t, i,  DOMContentLoaded;
</ins><span class="cx"> 
</span><del>-datetime = now.getUTCFullYear() + '-' +
-zeroise(now.getUTCMonth() + 1, 2) + '-' +
-zeroise(now.getUTCDate(), 2) + 'T' +
-zeroise(now.getUTCHours(), 2) + ':' +
-zeroise(now.getUTCMinutes(), 2) + ':' +
-zeroise(now.getUTCSeconds() ,2) +
-'+00:00';
</del><ins>+                if ( typeof jQuery != 'undefined' ) {
+                        jQuery(document).ready(func);
+                } else {
+                        t = _domReady;
+                        t.funcs = [];
</ins><span class="cx"> 
</span><del>-edButtons[edButtons.length] =
-new edButton('ed_strong'
-,'b'
-,'&lt;strong&gt;'
-,'&lt;/strong&gt;'
-,'b'
-);
</del><ins>+                        t.ready = function() {
+                                if ( ! t.isReady ) {
+                                        t.isReady = true;
+                                        for ( i = 0; i &lt; t.funcs.length; i++ ) {
+                                                t.funcs[i]();
+                                        }
+                                }
+                        };
</ins><span class="cx"> 
</span><del>-edButtons[edButtons.length] =
-new edButton('ed_em'
-,'i'
-,'&lt;em&gt;'
-,'&lt;/em&gt;'
-,'i'
-);
</del><ins>+                        if ( t.isReady ) {
+                                func();
+                        } else {
+                                t.funcs.push(func);
+                        }
</ins><span class="cx"> 
</span><del>-edButtons[edButtons.length] =
-new edButton('ed_link'
-,'link'
-,''
-,'&lt;/a&gt;'
-,'a'
-); // special case
</del><ins>+                        if ( ! t.eventAttached ) {
+                                if ( document.addEventListener ) {
+                                        DOMContentLoaded = function(){document.removeEventListener('DOMContentLoaded', DOMContentLoaded, false);t.ready();};
+                                        document.addEventListener('DOMContentLoaded', DOMContentLoaded, false);
+                                        window.addEventListener('load', t.ready, false);
+                                } else if ( document.attachEvent ) {
+                                        DOMContentLoaded = function(){if (document.readyState === 'complete'){ document.detachEvent('onreadystatechange', DOMContentLoaded);t.ready();}};
+                                        document.attachEvent('onreadystatechange', DOMContentLoaded);
+                                        window.attachEvent('onload', t.ready);
</ins><span class="cx"> 
</span><del>-edButtons[edButtons.length] =
-new edButton('ed_block'
-,'b-quote'
-,'\n\n&lt;blockquote&gt;'
-,'&lt;/blockquote&gt;\n\n'
-,'q'
-);
</del><ins>+                                        (function(){
+                                                try {
+                                                        document.documentElement.doScroll(&quot;left&quot;);
+                                                } catch(e) {
+                                                        setTimeout(arguments.callee, 50);
+                                                        return;
+                                                }
</ins><span class="cx"> 
</span><ins>+                                                t.ready();
+                                        })();
+                                }
</ins><span class="cx"> 
</span><del>-edButtons[edButtons.length] =
-new edButton('ed_del'
-,'del'
-,'&lt;del datetime=&quot;' + datetime + '&quot;&gt;'
-,'&lt;/del&gt;'
-,'d'
-);
</del><ins>+                                t.eventAttached = true;
+                        }
+                }
+        },
</ins><span class="cx"> 
</span><del>-edButtons[edButtons.length] =
-new edButton('ed_ins'
-,'ins'
-,'&lt;ins datetime=&quot;' + datetime + '&quot;&gt;'
-,'&lt;/ins&gt;'
-,'s'
-);
</del><ins>+        _datetime = (function() {
+                var now = new Date(), zeroise;
</ins><span class="cx"> 
</span><del>-edButtons[edButtons.length] =
-new edButton('ed_img'
-,'img'
-,''
-,''
-,'m'
-,-1
-); // special case
</del><ins>+                zeroise = function(number) {
+                        var str = number.toString();
</ins><span class="cx"> 
</span><del>-edButtons[edButtons.length] =
-new edButton('ed_ul'
-,'ul'
-,'&lt;ul&gt;\n'
-,'&lt;/ul&gt;\n\n'
-,'u'
-);
</del><ins>+                        if ( str.length &lt; 2 )
+                                str = &quot;0&quot; + str;
</ins><span class="cx"> 
</span><del>-edButtons[edButtons.length] =
-new edButton('ed_ol'
-,'ol'
-,'&lt;ol&gt;\n'
-,'&lt;/ol&gt;\n\n'
-,'o'
-);
</del><ins>+                        return str;
+                }
</ins><span class="cx"> 
</span><del>-edButtons[edButtons.length] =
-new edButton('ed_li'
-,'li'
-,'\t&lt;li&gt;'
-,'&lt;/li&gt;\n'
-,'l'
-);
</del><ins>+                return now.getUTCFullYear() + '-' +
+                        zeroise( now.getUTCMonth() + 1 ) + '-' +
+                        zeroise( now.getUTCDate() ) + 'T' +
+                        zeroise( now.getUTCHours() ) + ':' +
+                        zeroise( now.getUTCMinutes() ) + ':' +
+                        zeroise( now.getUTCSeconds() ) +
+                        '+00:00';
+        })(),
</ins><span class="cx"> 
</span><del>-edButtons[edButtons.length] =
-new edButton('ed_code'
-,'code'
-,'&lt;code&gt;'
-,'&lt;/code&gt;'
-,'c'
-);
</del><ins>+        _customButtons = {},
+        qt;
</ins><span class="cx"> 
</span><del>-edButtons[edButtons.length] =
-new edButton('ed_more'
-,'more'
-,'&lt;!--more--&gt;'
-,''
-,'t'
-,-1
-);
-/*
-edButtons[edButtons.length] =
-new edButton('ed_next'
-,'page'
-,'&lt;!--nextpage--&gt;'
-,''
-,'p'
-,-1
-);
-*/
-function edLink() {
-        this.display = '';
-        this.URL = '';
-        this.newWin = 0;
-}
</del><ins>+        qt = QTags = function(settings) {
+                if ( typeof(settings) == 'string' )
+                        settings = {quicktags_id: settings};
+                else if ( typeof(settings) != 'object' )
+                        return false;
</ins><span class="cx"> 
</span><del>-edLinks[edLinks.length] = new edLink('WordPress'
-                                    ,'http://wordpress.org/'
-                                    );
</del><ins>+                var t = this,
+                        id = settings.quicktags_id,
+                        buttons = {},
+                        theButtons = {},
+                        canvas = document.getElementById(id),
+                        name = 'qt_' + id,
+                        html = '',
+                        i, tb, qb, btn, onclick;
</ins><span class="cx"> 
</span><del>-edLinks[edLinks.length] = new edLink('alexking.org'
-                                    ,'http://www.alexking.org/'
-                                    );
</del><ins>+                if ( !id || !canvas )
+                        return false;
</ins><span class="cx"> 
</span><del>-function edShowButton(button, i) {
-        if (button.id == 'ed_img') {
-                document.write('&lt;input type=&quot;button&quot; id=&quot;' + button.id + '&quot; accesskey=&quot;' + button.access + '&quot; class=&quot;ed_button&quot; onclick=&quot;edInsertImage(edCanvas);&quot; value=&quot;' + button.display + '&quot; /&gt;');
-        }
-        else if (button.id == 'ed_link') {
-                document.write('&lt;input type=&quot;button&quot; id=&quot;' + button.id + '&quot; accesskey=&quot;' + button.access + '&quot; class=&quot;ed_button&quot; onclick=&quot;edInsertLink(edCanvas, ' + i + ');&quot; value=&quot;' + button.display + '&quot; /&gt;');
-        }
-        else {
-                document.write('&lt;input type=&quot;button&quot; id=&quot;' + button.id + '&quot; accesskey=&quot;' + button.access + '&quot; class=&quot;ed_button&quot; onclick=&quot;edInsertTag(edCanvas, ' + i + ');&quot; value=&quot;' + button.display + '&quot;  /&gt;');
-        }
-}
</del><ins>+                t.name = name;
+                t.id = id;
</ins><span class="cx"> 
</span><del>-function edShowLinks() {
-        var tempStr = '&lt;select onchange=&quot;edQuickLink(this.options[this.selectedIndex].value, this);&quot;&gt;&lt;option value=&quot;-1&quot; selected&gt;' + quicktagsL10n.quickLinks + '&lt;/option&gt;', i;
-        for (i = 0; i &lt; edLinks.length; i++) {
-                tempStr += '&lt;option value=&quot;' + i + '&quot;&gt;' + edLinks[i].display + '&lt;/option&gt;';
-        }
-        tempStr += '&lt;/select&gt;';
-        document.write(tempStr);
-}
</del><ins>+                // default buttons
+                for ( i in edButtons ) {
+                        buttons[edButtons[i].id] = edButtons[i];
+                }
</ins><span class="cx"> 
</span><del>-function edAddTag(button) {
-        if (edButtons[button].tagEnd != '') {
-                edOpenTags[edOpenTags.length] = button;
-                document.getElementById(edButtons[button].id).value = '/' + document.getElementById(edButtons[button].id).value;
-        }
-}
</del><ins>+                if ( id == 'content' &amp;&amp; adminpage &amp;&amp; ( adminpage == 'post-new-php' || adminpage == 'post-php' ) )
+                        buttons['fullscreen'] = new qt.FullscreenButton();
</ins><span class="cx"> 
</span><del>-function edRemoveTag(button) {
-        for (var i = 0; i &lt; edOpenTags.length; i++) {
-                if (edOpenTags[i] == button) {
-                        edOpenTags.splice(i, 1);
-                        document.getElementById(edButtons[button].id).value =                 document.getElementById(edButtons[button].id).value.replace('/', '');
</del><ins>+                // add custom buttons
+                for ( i in t._customButtons ) {
+                        buttons[i] = new t._customButtons[i]();
</ins><span class="cx">                 }
</span><del>-        }
-}
</del><span class="cx"> 
</span><del>-function edCheckOpenTags(button) {
-        var tag = 0, i;
-        for (i = 0; i &lt; edOpenTags.length; i++) {
-                if (edOpenTags[i] == button) {
-                        tag++;
</del><ins>+                if ( settings.quicktags_buttons ) {
+                        qb = settings.quicktags_buttons.split(',');
+
+                        for ( i in qb ) {
+                                btn = qb[i];
+                                if ( buttons[btn] )
+                                        theButtons[btn] = buttons[btn];
+                        }
+                } else {
+                        theButtons = buttons;
</ins><span class="cx">                 }
</span><del>-        }
-        if (tag &gt; 0) {
-                return true; // tag found
-        }
-        else {
-                return false; // tag not found
-        }
-}
</del><span class="cx"> 
</span><del>-function edCloseAllTags() {
-        var count = edOpenTags.length, o;
-        for (o = 0; o &lt; count; o++) {
-                edInsertTag(edCanvas, edOpenTags[edOpenTags.length - 1]);
-        }
-}
</del><ins>+                if ( settings.quicktags_disabled_buttons ) {
+                        qb = settings.quicktags_disabled_buttons.split(',');
</ins><span class="cx"> 
</span><del>-function edQuickLink(i, thisSelect) {
-        if (i &gt; -1) {
-                var newWin = '', tempStr;
-                if (edLinks[i].newWin == 1) {
-                        newWin = ' target=&quot;_blank&quot;';
</del><ins>+                        for ( i in qb ) {
+                                btn = qb[i];
+                                if ( theButtons[btn] )
+                                        delete(theButtons[btn]);
+                        }
</ins><span class="cx">                 }
</span><del>-                tempStr = '&lt;a href=&quot;' + edLinks[i].URL + '&quot;' + newWin + '&gt;'
-                            + edLinks[i].display
-                            + '&lt;/a&gt;';
-                thisSelect.selectedIndex = 0;
-                edInsertContent(edCanvas, tempStr);
-        }
-        else {
-                thisSelect.selectedIndex = 0;
-        }
-}
</del><span class="cx"> 
</span><del>-function edSpell(myField) {
-        var word = '', sel, startPos, endPos;
-        if (document.selection) {
-                myField.focus();
-            sel = document.selection.createRange();
-                if (sel.text.length &gt; 0) {
-                        word = sel.text;
-                }
-        }
-        else if (myField.selectionStart || myField.selectionStart == '0') {
-                startPos = myField.selectionStart;
-                endPos = myField.selectionEnd;
-                if (startPos != endPos) {
-                        word = myField.value.substring(startPos, endPos);
-                }
-        }
-        if (word == '') {
-                word = prompt(quicktagsL10n.wordLookup, '');
-        }
-        if (word !== null &amp;&amp; /^\w[\w ]*$/.test(word)) {
-                window.open('http://www.answers.com/' + escape(word));
-        }
-}
</del><ins>+                for ( i in theButtons )
+                        html += theButtons[i].html(name + '_');
</ins><span class="cx"> 
</span><del>-function edToolbar() {
-        document.write('&lt;div id=&quot;ed_toolbar&quot;&gt;');
-        for (var i = 0; i &lt; edButtons.length; i++) {
-                edShowButton(edButtons[i], i);
-        }
-        document.write('&lt;input type=&quot;button&quot; id=&quot;ed_spell&quot; class=&quot;ed_button&quot; onclick=&quot;edSpell(edCanvas);&quot; title=&quot;' + quicktagsL10n.dictionaryLookup + '&quot; value=&quot;' + quicktagsL10n.lookup + '&quot; /&gt;');
-        document.write('&lt;input type=&quot;button&quot; id=&quot;ed_close&quot; class=&quot;ed_button&quot; onclick=&quot;edCloseAllTags();&quot; title=&quot;' + quicktagsL10n.closeAllOpenTags + '&quot; value=&quot;' + quicktagsL10n.closeTags + '&quot; /&gt;');
-        document.write('&lt;input type=&quot;button&quot; id=&quot;ed_fullscreen&quot; class=&quot;ed_button&quot; onclick=&quot;fullscreen.on();&quot; title=&quot;' + quicktagsL10n.toggleFullscreen + '&quot; value=&quot;' + quicktagsL10n.fullscreen + '&quot; /&gt;');
-//        edShowLinks(); // disabled by default
-        document.write('&lt;/div&gt;');
-}
</del><ins>+                tb = document.createElement('div');
+                tb.id = name + '_toolbar';
+                tb.className = 'quicktags-toolbar';
</ins><span class="cx"> 
</span><del>-// insertion code
</del><ins>+                canvas.parentNode.insertBefore(tb, canvas);
</ins><span class="cx"> 
</span><del>-function edInsertTag(myField, i) {
-        //IE support
-        if (document.selection) {
-                myField.focus();
-            var sel = document.selection.createRange();
-                if (sel.text.length &gt; 0) {
-                        sel.text = edButtons[i].tagStart + sel.text + edButtons[i].tagEnd;
-                }
-                else {
-                        if (!edCheckOpenTags(i) || edButtons[i].tagEnd == '') {
-                                sel.text = edButtons[i].tagStart;
-                                edAddTag(i);
-                        }
-                        else {
-                                sel.text = edButtons[i].tagEnd;
-                                edRemoveTag(i);
-                        }
-                }
-                myField.focus();
-        }
-        //MOZILLA/NETSCAPE support
-        else if (myField.selectionStart || myField.selectionStart == '0') {
-                var startPos = myField.selectionStart, endPos = myField.selectionEnd, cursorPos = endPos, scrollTop = myField.scrollTop;
</del><ins>+                tb.innerHTML = html;
+                t.toolbar = tb;
</ins><span class="cx"> 
</span><del>-                if (startPos != endPos) {
-                        myField.value = myField.value.substring(0, startPos)
-                                      + edButtons[i].tagStart
-                                      + myField.value.substring(startPos, endPos)
-                                      + edButtons[i].tagEnd
-                                      + myField.value.substring(endPos, myField.value.length);
-                        cursorPos += edButtons[i].tagStart.length + edButtons[i].tagEnd.length;
-                }
-                else {
-                        if (!edCheckOpenTags(i) || edButtons[i].tagEnd == '') {
-                                myField.value = myField.value.substring(0, startPos)
-                                              + edButtons[i].tagStart
-                                              + myField.value.substring(endPos, myField.value.length);
-                                edAddTag(i);
-                                cursorPos = startPos + edButtons[i].tagStart.length;
-                        }
-                        else {
-                                myField.value = myField.value.substring(0, startPos)
-                                              + edButtons[i].tagEnd
-                                              + myField.value.substring(endPos, myField.value.length);
-                                edRemoveTag(i);
-                                cursorPos = startPos + edButtons[i].tagEnd.length;
-                        }
-                }
-                myField.focus();
-                myField.selectionStart = cursorPos;
-                myField.selectionEnd = cursorPos;
-                myField.scrollTop = scrollTop;
-        }
-        else {
-                if (!edCheckOpenTags(i) || edButtons[i].tagEnd == '') {
-                        myField.value += edButtons[i].tagStart;
-                        edAddTag(i);
-                }
-                else {
-                        myField.value += edButtons[i].tagEnd;
-                        edRemoveTag(i);
-                }
-                myField.focus();
-        }
-}
</del><ins>+                // listen for click events
+                onclick = function(e) {
+                        e = e || window.event;
+                        var target = e.target || e.srcElement, i;
</ins><span class="cx"> 
</span><del>-function edInsertContent(myField, myValue) {
-        var sel, startPos, endPos, scrollTop;
</del><ins>+                        // as long as it has the class ed_button, execute the callback
+                        if ( /\s+ed_button\s+/.test(' ' + target.className + ' ' ) ) {
+                                // we have to reassign canvas here
+                                t.canvas = canvas = document.getElementById(id);
+                                i = target.id.replace(name + '_', '');
</ins><span class="cx"> 
</span><del>-        //IE support
-        if (document.selection) {
-                myField.focus();
-                sel = document.selection.createRange();
-                sel.text = myValue;
-                myField.focus();
-        }
-        //MOZILLA/NETSCAPE support
-        else if (myField.selectionStart || myField.selectionStart == '0') {
-                startPos = myField.selectionStart;
-                endPos = myField.selectionEnd;
-                scrollTop = myField.scrollTop;
-                myField.value = myField.value.substring(0, startPos)
-                              + myValue
-                      + myField.value.substring(endPos, myField.value.length);
-                myField.focus();
-                myField.selectionStart = startPos + myValue.length;
-                myField.selectionEnd = startPos + myValue.length;
-                myField.scrollTop = scrollTop;
-        } else {
-                myField.value += myValue;
-                myField.focus();
-        }
-}
</del><ins>+                                if ( theButtons[i] )
+                                        theButtons[i].callback.call(theButtons[i], target, canvas, t);
+                        }
+                };
</ins><span class="cx"> 
</span><del>-function edInsertLink(myField, i, defaultValue) {
-        if ( 'object' == typeof(wpLink) ) {
-                wpLink.open();
-        } else {
-                if (!defaultValue) {
-                        defaultValue = 'http://';
</del><ins>+                if ( tb.addEventListener ) {
+                        tb.addEventListener('click', onclick, false);
+                } else if ( tb.attachEvent ) {
+                        tb.attachEvent('onclick', onclick);
</ins><span class="cx">                 }
</span><del>-                if (!edCheckOpenTags(i)) {
-                        var URL = prompt(quicktagsL10n.enterURL, defaultValue);
-                        if (URL) {
-                                edButtons[i].tagStart = '&lt;a href=&quot;' + URL + '&quot;&gt;';
-                                edInsertTag(myField, i);
-                        }
-                }
-                else {
-                        edInsertTag(myField, i);
-                }
-        }
-}
</del><span class="cx"> 
</span><del>-function edInsertImage(myField) {
-        var myValue = prompt(quicktagsL10n.enterImageURL, 'http://');
-        if (myValue) {
-                myValue = '&lt;img src=&quot;'
-                                + myValue
-                                + '&quot; alt=&quot;' + prompt(quicktagsL10n.enterImageDescription, '')
-                                + '&quot; /&gt;';
-                edInsertContent(myField, myValue);
-        }
-}
</del><ins>+                qt.instances[id] = t;
+        };
</ins><span class="cx"> 
</span><ins>+        qt.instances = {};
</ins><span class="cx"> 
</span><del>-// Allow multiple instances.
-// Name = unique value, id = textarea id, container = container div.
-// Can disable some buttons by passing comma delimited string as 4th param.
-var QTags = function(name, id, container, disabled) {
-        var t = this, cont = document.getElementById(container), i, tag, tb, html, sel;
</del><ins>+        qt.registerButton = function(id, btnClass) {
+                _customButtons[id] = btnClass;
+        };
</ins><span class="cx"> 
</span><del>-        t.Buttons = [];
-        t.Links = [];
-        t.OpenTags = [];
-        t.Canvas = document.getElementById(id);
</del><ins>+        qt.getInstance = function(id) {
+                return qt.instances[id];
+        };
</ins><span class="cx"> 
</span><del>-        if ( ! t.Canvas || ! cont )
-                return;
</del><ins>+        qt.insertContent = function(editor_id, content) {
+                var sel, startPos, endPos, scrollTop, text, ed = document.getElementById(editor_id);
</ins><span class="cx"> 
</span><del>-        disabled = ( typeof disabled != 'undefined' ) ? ','+disabled+',' : '';
</del><ins>+                if ( document.selection ) { //IE
+                        ed.focus();
+                        sel = document.selection.createRange();
+                        sel.text = content;
+                        ed.focus();
+                } else if ( ed.selectionStart || ed.selectionStart == '0' ) { // all other
+                        text = ed.value;
+                        startPos = ed.selectionStart;
+                        endPos = ed.selectionEnd;
+                        scrollTop = ed.scrollTop;
</ins><span class="cx"> 
</span><del>-        t.edShowButton = function(button, i) {
-                if ( disabled &amp;&amp; (disabled.indexOf(','+button.display+',') != -1) )
-                        return '';
-                else if ( button.id == name+'_img' )
-                        return '&lt;input type=&quot;button&quot; id=&quot;' + button.id + '&quot; accesskey=&quot;' + button.access + '&quot; class=&quot;ed_button&quot; onclick=&quot;edInsertImage('+name+'.Canvas);&quot; value=&quot;' + button.display + '&quot; /&gt;';
-                else if (button.id == name+'_link')
-                        return '&lt;input type=&quot;button&quot; id=&quot;' + button.id + '&quot; accesskey=&quot;' + button.access + '&quot; class=&quot;ed_button&quot; onclick=&quot;'+name+'.edInsertLink('+i+');&quot; value=&quot;'+button.display+'&quot; /&gt;';
-                else
-                        return '&lt;input type=&quot;button&quot; id=&quot;' + button.id + '&quot; accesskey=&quot;'+button.access+'&quot; class=&quot;ed_button&quot; onclick=&quot;'+name+'.edInsertTag('+i+');&quot; value=&quot;'+button.display+'&quot; /&gt;';
-        };
</del><ins>+                        ed.value = text.substring(0, startPos) + content + text.substring(endPos, text.length);
</ins><span class="cx"> 
</span><del>-        t.edAddTag = function(button) {
-                if ( t.Buttons[button].tagEnd != '' ) {
-                        t.OpenTags[t.OpenTags.length] = button;
-                        document.getElementById(t.Buttons[button].id).value = '/' + document.getElementById(t.Buttons[button].id).value;
</del><ins>+                        ed.focus();
+                        ed.selectionStart = startPos + content.length;
+                        ed.selectionEnd = startPos + content.length;
+                        ed.scrollTop = scrollTop;
+                } else {
+                        ed.value += content;
+                        ed.focus();
</ins><span class="cx">                 }
</span><span class="cx">         };
</span><span class="cx"> 
</span><del>-        t.edRemoveTag = function(button) {
-                for ( i = 0; i &lt; t.OpenTags.length; i++ ) {
-                        if ( t.OpenTags[i] == button ) {
-                                t.OpenTags.splice(i, 1);
-                                document.getElementById(t.Buttons[button].id).value = document.getElementById(t.Buttons[button].id).value.replace('/', '');
-                        }
-                }
</del><ins>+        // a plain, dumb button
+        qt.Button = function(id, display, access, title) {
+                var t = this;
+                t.id = id;
+                t.display = display;
+                t.access = access;
+                t.title = title || '';
</ins><span class="cx">         };
</span><ins>+        qt.Button.prototype.html = function(idPrefix) {
+                var access = this.access ? ' accesskey=&quot;' + this.access + '&quot;' : '';
+                return '&lt;input type=&quot;button&quot; id=&quot;' + idPrefix + this.id + '&quot;' + access + ' class=&quot;ed_button&quot; title=&quot;' + this.title + '&quot; value=&quot;' + this.display + '&quot; /&gt;';
+        };
+        qt.Button.prototype.callback = function(canvas) {};
</ins><span class="cx"> 
</span><del>-        t.edCheckOpenTags = function(button) {
-                tag = 0;
-                for ( var i = 0; i &lt; t.OpenTags.length; i++ ) {
-                        if ( t.OpenTags[i] == button )
-                                tag++;
</del><ins>+        // a button that inserts HTML tag
+        qt.TagButton = function(id, display, tagStart, tagEnd, access, open, title) {
+                var t = this;
+                qt.Button.call(t, id, display, access, title);
+                t.tagStart = tagStart;
+                t.tagEnd = tagEnd;
+                t.open = open;
+        };
+        qt.TagButton.prototype = new qt.Button();
+        qt.TagButton.prototype.openTag = function(e, tb) {
+                var t = this;
+                if ( ! tb.openTags ) {
+                        tb.openTags = [];
</ins><span class="cx">                 }
</span><del>-                if ( tag &gt; 0 ) return true; // tag found
-                else return false; // tag not found
</del><ins>+                if ( t.tagEnd ) {
+                        tb.openTags.push(t.id);
+                        e.value = '/' + e.value;
+                }
</ins><span class="cx">         };
</span><ins>+        qt.TagButton.prototype.closeTag = function(e, tb) {
+                var t = this,
+                        i = t.isOpen(tb);
</ins><span class="cx"> 
</span><del>-        this.edCloseAllTags = function() {
-                var count = t.OpenTags.length;
-                for ( var o = 0; o &lt; count; o++ )
-                        t.edInsertTag(t.OpenTags[t.OpenTags.length - 1]);
-        };
</del><ins>+                if ( i !== false ) {
+                        tb.openTags.splice(i, 1);
+                }
</ins><span class="cx"> 
</span><del>-        this.edQuickLink = function(i, thisSelect) {
-                if ( i &gt; -1 ) {
-                        var newWin = '', tempStr;
-                        if ( Links[i].newWin == 1 ) {
-                                newWin = ' target=&quot;_blank&quot;';
</del><ins>+                e.value = t.display;
+        };
+        // whether a tag is open or not. Returns false if not open, or current open depth of the tag
+        qt.TagButton.prototype.isOpen = function (tb) {
+                var t = this, i = 0, ret = false;
+                if ( tb.openTags ) {
+                        while ( ret === false &amp;&amp; i &lt; tb.openTags.length ) {
+                                ret = tb.openTags[i] == t.id ? i : false;
+                                i ++;
</ins><span class="cx">                         }
</span><del>-                        tempStr = '&lt;a href=&quot;' + Links[i].URL + '&quot;' + newWin + '&gt;'
-                                    + Links[i].display
-                                    + '&lt;/a&gt;';
-                        thisSelect.selectedIndex = 0;
-                        edInsertContent(t.Canvas, tempStr);
</del><span class="cx">                 } else {
</span><del>-                        thisSelect.selectedIndex = 0;
</del><ins>+                        ret = false;
</ins><span class="cx">                 }
</span><ins>+                return ret;
</ins><span class="cx">         };
</span><ins>+        qt.TagButton.prototype.callback = function(element, canvas, toolbar) {
+                var t = this, startPos, endPos, cursorPos, scrollTop, v, l, r, i, sel;
</ins><span class="cx"> 
</span><del>-        // insertion code
-        t.edInsertTag = function(i) {
-                //IE support
</del><ins>+                v = canvas.value;
+
+                // IE support
</ins><span class="cx">                 if ( document.selection ) {
</span><del>-                        t.Canvas.focus();
-                    sel = document.selection.createRange();
</del><ins>+                        canvas.focus();
+                        sel = document.selection.createRange();
</ins><span class="cx">                         if ( sel.text.length &gt; 0 ) {
</span><del>-                                sel.text = t.Buttons[i].tagStart + sel.text + t.Buttons[i].tagEnd;
</del><ins>+                                sel.text = t.tagStart + sel.text + t.tagEnd;
</ins><span class="cx">                         } else {
</span><del>-                                if ( ! t.edCheckOpenTags(i) || t.Buttons[i].tagEnd == '' ) {
-                                        sel.text = t.Buttons[i].tagStart;
-                                        t.edAddTag(i);
</del><ins>+                                if ( t.isOpen(toolbar) === false || t.tagEnd === '' ) {
+                                        sel.text = t.tagStart;
+                                        t.openTag(element, toolbar);
</ins><span class="cx">                                 } else {
</span><del>-                                        sel.text = t.Buttons[i].tagEnd;
-                                        t.edRemoveTag(i);
</del><ins>+                                        sel.text = t.tagEnd;
+                                        t.closeTag(element, toolbar);
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><del>-                        t.Canvas.focus();
-                } else if ( t.Canvas.selectionStart || t.Canvas.selectionStart == '0' ) { //MOZILLA/NETSCAPE support
-                        var startPos = t.Canvas.selectionStart, endPos = t.Canvas.selectionEnd, cursorPos = endPos, scrollTop = t.Canvas.scrollTop;
-
</del><ins>+                        canvas.focus();
+                }
+                // moz, webkit, opera
+                else if ( canvas.selectionStart || canvas.selectionStart == '0' ) {
+                        startPos = canvas.selectionStart;
+                        endPos = canvas.selectionEnd;
+                        cursorPos = endPos;
+                        scrollTop = canvas.scrollTop;
+                        l = v.substring(0, startPos); // left of the selection
+                        r = v.substring(endPos, v.length); // right of the selection
+                        i = v.substring(startPos, endPos); // inside the selection
</ins><span class="cx">                         if ( startPos != endPos ) {
</span><del>-                                t.Canvas.value = t.Canvas.value.substring(0, startPos)
-                                              + t.Buttons[i].tagStart
-                                              + t.Canvas.value.substring(startPos, endPos)
-                                              + t.Buttons[i].tagEnd
-                                              + t.Canvas.value.substring(endPos, t.Canvas.value.length);
-                                cursorPos += t.Buttons[i].tagStart.length + t.Buttons[i].tagEnd.length;
</del><ins>+                                canvas.value = l + t.tagStart + i + t.tagEnd + r;
+                                if ( t.tagEnd === '' ) {
+                                        cursorPos = startPos;
+                                }
+                                cursorPos += t.tagStart.length + t.tagEnd.length;
</ins><span class="cx">                         } else {
</span><del>-                                if ( !t.edCheckOpenTags(i) || t.Buttons[i].tagEnd == '' ) {
-                                        t.Canvas.value = t.Canvas.value.substring(0, startPos)
-                                                      + t.Buttons[i].tagStart
-                                                      + t.Canvas.value.substring(endPos, t.Canvas.value.length);
-                                        t.edAddTag(i);
-                                        cursorPos = startPos + t.Buttons[i].tagStart.length;
</del><ins>+                                if ( t.isOpen(toolbar) === false || t.tagEnd === '' ) {
+                                        canvas.value = l + t.tagStart + r;
+                                        t.openTag(element, toolbar);
+                                        cursorPos = startPos + t.tagStart.length;
</ins><span class="cx">                                 } else {
</span><del>-                                        t.Canvas.value = t.Canvas.value.substring(0, startPos)
-                                                      + t.Buttons[i].tagEnd
-                                                      + t.Canvas.value.substring(endPos, t.Canvas.value.length);
-                                        t.edRemoveTag(i);
-                                        cursorPos = startPos + t.Buttons[i].tagEnd.length;
</del><ins>+                                        canvas.value = l + t.tagEnd + r;
+                                        cursorPos = startPos + t.tagEnd.length;
+                                        t.closeTag(element, toolbar);
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><del>-                        t.Canvas.focus();
-                        t.Canvas.selectionStart = cursorPos;
-                        t.Canvas.selectionEnd = cursorPos;
-                        t.Canvas.scrollTop = scrollTop;
-                } else {
-                        if ( ! t.edCheckOpenTags(i) || t.Buttons[i].tagEnd == '' ) {
-                                t.Canvas.value += Buttons[i].tagStart;
-                                t.edAddTag(i);
</del><ins>+
+                        canvas.focus();
+                        canvas.selectionStart = cursorPos;
+                        canvas.selectionEnd = cursorPos;
+                        canvas.scrollTop = scrollTop;
+                }
+                // other browsers
+                else {
+                        if ( t.isOpen(toolbar) !== false || t.tagEnd === '' ) {
+                                canvas.value += t.tagStart;
+                                t.openTag(element, toolbar);
</ins><span class="cx">                         } else {
</span><del>-                                t.Canvas.value += Buttons[i].tagEnd;
-                                t.edRemoveTag(i);
</del><ins>+                                canvas.value += t.tagEnd;
+                                t.closeTag(element, toolbar);
</ins><span class="cx">                         }
</span><del>-                        t.Canvas.focus();
</del><ins>+                        canvas.focus();
</ins><span class="cx">                 }
</span><span class="cx">         };
</span><span class="cx"> 
</span><del>-        this.edInsertLink = function(i, defaultValue) {
</del><ins>+        // the spell button
+        qt.SpellButton = function() {
+                qt.Button.call(this, 'spell', quicktagsL10n.lookup, '', quicktagsL10n.dictionaryLookup);
+        };
+        qt.SpellButton.prototype = new qt.Button();
+        qt.SpellButton.prototype.callback = function(element, canvas, toolbar) {
+                var word = '', sel, startPos, endPos;
+
+                if ( document.selection ) {
+                        canvas.focus();
+                        sel = document.selection.createRange();
+                        if ( sel.text.length &gt; 0 ) {
+                                word = sel.text;
+                        }
+                }
+                else if ( canvas.selectionStart || canvas.selectionStart == '0' ) {
+                        startPos = canvas.selectionStart;
+                        endPos = canvas.selectionEnd;
+                        if ( startPos != endPos ) {
+                                word = canvas.value.substring(startPos, endPos);
+                        }
+                }
+
+                if ( word === '' ) {
+                        word = prompt(quicktagsL10n.wordLookup, '');
+                }
+
+                if ( word !== null &amp;&amp; /^\w[\w ]*$/.test(word)) {
+                        window.open('http://www.answers.com/' + encodeURIComponent(word));
+                }
+        };
+
+        // the close button
+        qt.CloseButton = function() {
+                qt.Button.call(this, 'close', quicktagsL10n.closeTags, '', quicktagsL10n.closeAllOpenTags);
+        };
+        qt.CloseButton.prototype = new qt.Button();
+        qt.CloseButton.prototype.callback = function(e, c, tb) {
+                var button, element, tbo = tb.openTags;
+                if ( tbo ) {
+                        while ( tbo.length &gt; 0 ) {
+                                button = tb.getButton(tbo[tbo.length - 1]);
+                                element = document.getElementById(tb.name + '_' + button.id);
+                                button.callback.call(button, element, c, tb);
+                        }
+                }
+        };
+
+        qt.prototype.closeAllTags = function() {
+                var btn = this.getButton('close');
+                btn.callback.call(btn, '', this.canvas, this.toolbar);
+        };
+
+        // the link button
+        qt.LinkButton = function() {
+                qt.TagButton.call(this, 'link', 'link', '', '&lt;/a&gt;', 'a');
+        };
+        qt.LinkButton.prototype = new qt.TagButton();
+        qt.LinkButton.prototype.callback = function(e, c, tb, defaultValue) {
+                var URL, t = this;
+
+                if ( typeof(wpLink) != 'undefined' ) {
+                        wpLink.open();
+                        return;
+                }
+
</ins><span class="cx">                 if ( ! defaultValue )
</span><span class="cx">                         defaultValue = 'http://';
</span><span class="cx"> 
</span><del>-                if ( ! t.edCheckOpenTags(i) ) {
-                        var URL = prompt(quicktagsL10n.enterURL, defaultValue);
</del><ins>+                if ( t.isOpen(tb) === false ) {
+                        URL = prompt(quicktagsL10n.enterURL, defaultValue);
</ins><span class="cx">                         if ( URL ) {
</span><del>-                                t.Buttons[i].tagStart = '&lt;a href=&quot;' + URL + '&quot;&gt;';
-                                t.edInsertTag(i);
</del><ins>+                                t.tagStart = '&lt;a href=&quot;' + URL + '&quot;&gt;';
+                                qt.TagButton.prototype.callback.call(t, e, c, tb);
</ins><span class="cx">                         }
</span><span class="cx">                 } else {
</span><del>-                        t.edInsertTag(i);
</del><ins>+                        qt.TagButton.prototype.callback.call(t, e, c, tb);
</ins><span class="cx">                 }
</span><span class="cx">         };
</span><span class="cx"> 
</span><del>-        this.edInsertImage = function() {
-                var myValue = prompt(quicktagsL10n.enterImageURL, 'http://');
-                if ( myValue ) {
-                        myValue = '&lt;img src=&quot;'
-                                        + myValue
-                                        + '&quot; alt=&quot;' + prompt(quicktagsL10n.enterImageDescription, '')
-                                        + '&quot; /&gt;';
-                        edInsertContent(t.Canvas, myValue);
</del><ins>+        // the img button
+        qt.ImgButton = function() {
+                qt.TagButton.call(this, 'img', 'img', '', '', 'm', -1);
+        };
+        qt.ImgButton.prototype = new qt.TagButton();
+        qt.ImgButton.prototype.callback = function(e, c, tb, defaultValue) {
+                if ( ! defaultValue ) {
+                        defaultValue = 'http://';
</ins><span class="cx">                 }
</span><ins>+                var src = prompt(quicktagsL10n.enterImageURL, defaultValue), alt;
+                if ( src ) {
+                        alt = prompt(quicktagsL10n.enterImageDescription, '');
+                        this.tagStart = '&lt;img src=&quot;' + src + '&quot; alt=&quot;' + alt + '&quot; /&gt;';
+                        qt.TagButton.prototype.callback.call(this, e, c, tb);
+                }
</ins><span class="cx">         };
</span><span class="cx"> 
</span><del>-        t.Buttons[t.Buttons.length] = new edButton(name+'_strong','b','&lt;strong&gt;','&lt;/strong&gt;','b');
-        t.Buttons[t.Buttons.length] = new edButton(name+'_em','i','&lt;em&gt;','&lt;/em&gt;','i');
-        t.Buttons[t.Buttons.length] = new edButton(name+'_link','link','','&lt;/a&gt;','a'); // special case
-        t.Buttons[t.Buttons.length] = new edButton(name+'_block','b-quote','\n\n&lt;blockquote&gt;','&lt;/blockquote&gt;\n\n','q');
-        t.Buttons[t.Buttons.length] = new edButton(name+'_del','del','&lt;del datetime=&quot;' + datetime + '&quot;&gt;','&lt;/del&gt;','d');
-        t.Buttons[t.Buttons.length] = new edButton(name+'_ins','ins','&lt;ins datetime=&quot;' + datetime + '&quot;&gt;','&lt;/ins&gt;','s');
-        t.Buttons[t.Buttons.length] = new edButton(name+'_img','img','','','m',-1); // special case
-        t.Buttons[t.Buttons.length] = new edButton(name+'_ul','ul','&lt;ul&gt;\n','&lt;/ul&gt;\n\n','u');
-        t.Buttons[t.Buttons.length] = new edButton(name+'_ol','ol','&lt;ol&gt;\n','&lt;/ol&gt;\n\n','o');
-        t.Buttons[t.Buttons.length] = new edButton(name+'_li','li','\t&lt;li&gt;','&lt;/li&gt;\n','l');
-        t.Buttons[t.Buttons.length] = new edButton(name+'_code','code','&lt;code&gt;','&lt;/code&gt;','c');
-        t.Buttons[t.Buttons.length] = new edButton(name+'_more','more','&lt;!--more--&gt;','','t',-1);
-//        t.Buttons[t.Buttons.length] = new edButton(name+'_next','page','&lt;!--nextpage--&gt;','','p',-1);
</del><ins>+        qt.FullscreenButton = function() {
+                qt.Button.call(this, 'fullscreen', quicktagsL10n.fullscreen, 'f', quicktagsL10n.toggleFullscreen);
+        };
+        qt.FullscreenButton.prototype = new qt.Button();
+        qt.FullscreenButton.prototype.callback = function(e, c) {
+                if ( c.id != 'content' || typeof(fullscreen) == 'undefined' )
+                        return;
</ins><span class="cx"> 
</span><del>-        tb = document.createElement('div');
-        tb.id = name+'_qtags';
</del><ins>+                fullscreen.on();
+        };
</ins><span class="cx"> 
</span><del>-        html = '&lt;div id=&quot;'+name+'_toolbar&quot;&gt;';
-        for (i = 0; i &lt; t.Buttons.length; i++)
-                html += t.edShowButton(t.Buttons[i], i);
</del><ins>+        // ensure backward compatibility
+        edButtons = [
+                new qt.TagButton('strong','b','&lt;strong&gt;','&lt;/strong&gt;','b'),
+                new qt.TagButton('em','i','&lt;em&gt;','&lt;/em&gt;','i'),
+                new qt.LinkButton(), // special case
+                new qt.TagButton('block','b-quote','\n\n&lt;blockquote&gt;','&lt;/blockquote&gt;\n\n','q'),
+                new qt.TagButton('del','del','&lt;del datetime=&quot;' + _datetime + '&quot;&gt;','&lt;/del&gt;','d'),
+                new qt.TagButton('ins','ins','&lt;ins datetime=&quot;' + _datetime + '&quot;&gt;','&lt;/ins&gt;','s'),
+                new qt.ImgButton(), // special case
+                new qt.TagButton('ul','ul','&lt;ul&gt;\n','&lt;/ul&gt;\n\n','u'),
+                new qt.TagButton('ol','ol','&lt;ol&gt;\n','&lt;/ol&gt;\n\n','o'),
+                new qt.TagButton('li','li','\t&lt;li&gt;','&lt;/li&gt;\n','l'),
+                new qt.TagButton('code','code','&lt;code&gt;','&lt;/code&gt;','c'),
+                new qt.TagButton('more','more','&lt;!--more--&gt;','','t',-1),
+                new qt.SpellButton(),
+                new qt.CloseButton()
+        ];
</ins><span class="cx"> 
</span><del>-        html += '&lt;input type=&quot;button&quot; id=&quot;'+name+'_ed_spell&quot; class=&quot;ed_button&quot; onclick=&quot;edSpell('+name+'.Canvas);&quot; title=&quot;' + quicktagsL10n.dictionaryLookup + '&quot; value=&quot;' + quicktagsL10n.lookup + '&quot; /&gt;';
-        html += '&lt;input type=&quot;button&quot; id=&quot;'+name+'_ed_close&quot; class=&quot;ed_button&quot; onclick=&quot;'+name+'.edCloseAllTags();&quot; title=&quot;' + quicktagsL10n.closeAllOpenTags + '&quot; value=&quot;' + quicktagsL10n.closeTags + '&quot; /&gt;&lt;/div&gt;';
-
-        tb.innerHTML = html;
-        cont.parentNode.insertBefore(tb, cont);
-
-};
</del><ins>+        edButton = qt.TagButton;
+})();
</ins></span></pre></div>
<a id="trunkwpincludesjsquicktagsjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/quicktags.js (18496 => 18497)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/quicktags.js        2011-08-03 01:54:29 UTC (rev 18496)
+++ trunk/wp-includes/js/quicktags.js        2011-08-03 10:11:12 UTC (rev 18497)
</span><span class="lines">@@ -1 +1 @@
</span><del>-var edButtons=new Array(),edLinks=new Array(),edOpenTags=new Array(),now=new Date(),datetime;function edButton(f,e,c,b,a,d){this.id=f;this.display=e;this.tagStart=c;this.tagEnd=b;this.access=a;this.open=d}function zeroise(b,a){var c=b.toString();if(b&lt;0){c=c.substr(1,c.length)}while(c.length&lt;a){c=&quot;0&quot;+c}if(b&lt;0){c=&quot;-&quot;+c}return c}datetime=now.getUTCFullYear()+&quot;-&quot;+zeroise(now.getUTCMonth()+1,2)+&quot;-&quot;+zeroise(now.getUTCDate(),2)+&quot;T&quot;+zeroise(now.getUTCHours(),2)+&quot;:&quot;+zeroise(now.getUTCMinutes(),2)+&quot;:&quot;+zeroise(now.getUTCSeconds(),2)+&quot;+00:00&quot;;edButtons[edButtons.length]=new edButton(&quot;ed_strong&quot;,&quot;b&quot;,&quot;&lt;strong&gt;&quot;,&quot;&lt;/strong&gt;&quot;,&quot;b&quot;);edButtons[edButtons.length]=new edButton(&quot;ed_em&quot;,&quot;i&quot;,&quot;&lt;em&gt;&quot;,&quot;&lt;/em&gt;&quot;,&quot;i&quot;);edButtons[edButtons.length]=new edButton(&quot;ed_link&quot;,&quot;li
 nk&quot;,&quot;&quot;,&quot;&lt;/a&gt;&quot;,&quot;a&quot;);edButtons[edButtons.length]=new edButton(&quot;ed_block&quot;,&quot;b-quote&quot;,&quot;\n\n&lt;blockquote&gt;&quot;,&quot;&lt;/blockquote&gt;\n\n&quot;,&quot;q&quot;);edButtons[edButtons.length]=new edButton(&quot;ed_del&quot;,&quot;del&quot;,'&lt;del datetime=&quot;'+datetime+'&quot;&gt;',&quot;&lt;/del&gt;&quot;,&quot;d&quot;);edButtons[edButtons.length]=new edButton(&quot;ed_ins&quot;,&quot;ins&quot;,'&lt;ins datetime=&quot;'+datetime+'&quot;&gt;',&quot;&lt;/ins&gt;&quot;,&quot;s&quot;);edButtons[edButtons.length]=new edButton(&quot;ed_img&quot;,&quot;img&quot;,&quot;&quot;,&quot;&quot;,&quot;m&quot;,-1);edButtons[edButtons.length]=new edButton(&quot;ed_ul&quot;,&quot;ul&quot;,&quot;&lt;ul&gt;\n&quot;,&quot;&lt;/ul&gt;\n\n&quot;,&quot;u&quot;);edButtons[edButtons.length]=new edButton(&quot;ed_ol&quot;,&quot;ol&quot;,&quot;&lt;ol&gt;\n&quot;,&quot;&lt;/ol&gt;\n\n&quot;,&quot;o&quot;);edButtons[edButtons.length]=n
 ew edButton(&quot;ed_li&quot;,&quot;li&quot;,&quot;\t&lt;li&gt;&quot;,&quot;&lt;/li&gt;\n&quot;,&quot;l&quot;);edButtons[edButtons.length]=new edButton(&quot;ed_code&quot;,&quot;code&quot;,&quot;&lt;code&gt;&quot;,&quot;&lt;/code&gt;&quot;,&quot;c&quot;);edButtons[edButtons.length]=new edButton(&quot;ed_more&quot;,&quot;more&quot;,&quot;&lt;!--more--&gt;&quot;,&quot;&quot;,&quot;t&quot;,-1);function edLink(){this.display=&quot;&quot;;this.URL=&quot;&quot;;this.newWin=0}edLinks[edLinks.length]=new edLink(&quot;WordPress&quot;,&quot;http://wordpress.org/&quot;);edLinks[edLinks.length]=new edLink(&quot;alexking.org&quot;,&quot;http://www.alexking.org/&quot;);function edShowButton(b,a){if(b.id==&quot;ed_img&quot;){document.write('&lt;input type=&quot;button&quot; id=&quot;'+b.id+'&quot; accesskey=&quot;'+b.access+'&quot; class=&quot;ed_button&quot; onclick=&quot;edInsertImage(edCanvas);&quot; value=&quot;'+b.display+'&quot; /&gt;')}else{if(b.id==&quot;ed_link&quot;){document.wri
 te('&lt;input type=&quot;button&quot; id=&quot;'+b.id+'&quot; accesskey=&quot;'+b.access+'&quot; class=&quot;ed_button&quot; onclick=&quot;edInsertLink(edCanvas, '+a+');&quot; value=&quot;'+b.display+'&quot; /&gt;')}else{document.write('&lt;input type=&quot;button&quot; id=&quot;'+b.id+'&quot; accesskey=&quot;'+b.access+'&quot; class=&quot;ed_button&quot; onclick=&quot;edInsertTag(edCanvas, '+a+');&quot; value=&quot;'+b.display+'&quot;  /&gt;')}}}function edShowLinks(){var a='&lt;select onchange=&quot;edQuickLink(this.options[this.selectedIndex].value, this);&quot;&gt;&lt;option value=&quot;-1&quot; selected&gt;'+quicktagsL10n.quickLinks+&quot;&lt;/option&gt;&quot;,b;for(b=0;b&lt;edLinks.length;b++){a+='&lt;option value=&quot;'+b+'&quot;&gt;'+edLinks[b].display+&quot;&lt;/option&gt;&quot;}a+=&quot;&lt;/select&gt;&quot;;document.write(a)}function edAddTag(a){if(edButtons[a].tagEnd!=&quot;&quot;){edOpenTags[edOpenTags.length]=a;document.getElementById(edButtons[a].id).value=&q
 uot;/&quot;+document.getElementById(edButtons[a].id).value}}function edRemoveTag(b){for(var a=0;a&lt;edOpenTags.length;a++){if(edOpenTags[a]==b){edOpenTags.splice(a,1);document.getElementById(edButtons[b].id).value=document.getElementById(edButtons[b].id).value.replace(&quot;/&quot;,&quot;&quot;)}}}function edCheckOpenTags(c){var a=0,b;for(b=0;b&lt;edOpenTags.length;b++){if(edOpenTags[b]==c){a++}}if(a&gt;0){return true}else{return false}}function edCloseAllTags(){var a=edOpenTags.length,b;for(b=0;b&lt;a;b++){edInsertTag(edCanvas,edOpenTags[edOpenTags.length-1])}}function edQuickLink(c,d){if(c&gt;-1){var b=&quot;&quot;,a;if(edLinks[c].newWin==1){b=' target=&quot;_blank&quot;'}a='&lt;a href=&quot;'+edLinks[c].URL+'&quot;'+b+&quot;&gt;&quot;+edLinks[c].display+&quot;&lt;/a&gt;&quot;;d.selectedIndex=0;edInsertContent(edCanvas,a)}else{d.selectedIndex=0}}function edSpell(c){var e=&quot;&quot;,d,b,a;if(document.selection){c.focus();d=document.selection.createRange();if(d.text.lengt
 h&gt;0){e=d.text}}else{if(c.selectionStart||c.selectionStart==&quot;0&quot;){b=c.selectionStart;a=c.selectionEnd;if(b!=a){e=c.value.substring(b,a)}}}if(e==&quot;&quot;){e=prompt(quicktagsL10n.wordLookup,&quot;&quot;)}if(e!==null&amp;&amp;/^\w[\w ]*$/.test(e)){window.open(&quot;http://www.answers.com/&quot;+escape(e))}}function edToolbar(){document.write('&lt;div id=&quot;ed_toolbar&quot;&gt;');for(var a=0;a&lt;edButtons.length;a++){edShowButton(edButtons[a],a)}document.write('&lt;input type=&quot;button&quot; id=&quot;ed_spell&quot; class=&quot;ed_button&quot; onclick=&quot;edSpell(edCanvas);&quot; title=&quot;'+quicktagsL10n.dictionaryLookup+'&quot; value=&quot;'+quicktagsL10n.lookup+'&quot; /&gt;');document.write('&lt;input type=&quot;button&quot; id=&quot;ed_close&quot; class=&quot;ed_button&quot; onclick=&quot;edCloseAllTags();&quot; title=&quot;'+quicktagsL10n.closeAllOpenTags+'&quot; value=&quot;'+quicktagsL10n.closeTags+'&quot; /&gt;');document.write('&lt;input type=&
 quot;button&quot; id=&quot;ed_fullscreen&quot; class=&quot;ed_button&quot; onclick=&quot;fullscreen.on();&quot; title=&quot;'+quicktagsL10n.toggleFullscreen+'&quot; value=&quot;'+quicktagsL10n.fullscreen+'&quot; /&gt;');document.write(&quot;&lt;/div&gt;&quot;)}function edInsertTag(d,c){if(document.selection){d.focus();var e=document.selection.createRange();if(e.text.length&gt;0){e.text=edButtons[c].tagStart+e.text+edButtons[c].tagEnd}else{if(!edCheckOpenTags(c)||edButtons[c].tagEnd==&quot;&quot;){e.text=edButtons[c].tagStart;edAddTag(c)}else{e.text=edButtons[c].tagEnd;edRemoveTag(c)}}d.focus()}else{if(d.selectionStart||d.selectionStart==&quot;0&quot;){var b=d.selectionStart,a=d.selectionEnd,g=a,f=d.scrollTop;if(b!=a){d.value=d.value.substring(0,b)+edButtons[c].tagStart+d.value.substring(b,a)+edButtons[c].tagEnd+d.value.substring(a,d.value.length);g+=edButtons[c].tagStart.length+edButtons[c].tagEnd.length}else{if(!edCheckOpenTags(c)||edButtons[c].tagEnd==&quot;&quot;){d.value
 =d.value.substring(0,b)+edButtons[c].tagStart+d.value.substring(a,d.value.length);edAddTag(c);g=b+edButtons[c].tagStart.length}else{d.value=d.value.substring(0,b)+edButtons[c].tagEnd+d.value.substring(a,d.value.length);edRemoveTag(c);g=b+edButtons[c].tagEnd.length}}d.focus();d.selectionStart=g;d.selectionEnd=g;d.scrollTop=f}else{if(!edCheckOpenTags(c)||edButtons[c].tagEnd==&quot;&quot;){d.value+=edButtons[c].tagStart;edAddTag(c)}else{d.value+=edButtons[c].tagEnd;edRemoveTag(c)}d.focus()}}}function edInsertContent(d,c){var e,b,a,f;if(document.selection){d.focus();e=document.selection.createRange();e.text=c;d.focus()}else{if(d.selectionStart||d.selectionStart==&quot;0&quot;){b=d.selectionStart;a=d.selectionEnd;f=d.scrollTop;d.value=d.value.substring(0,b)+c+d.value.substring(a,d.value.length);d.focus();d.selectionStart=b+c.length;d.selectionEnd=b+c.length;d.scrollTop=f}else{d.value+=c;d.focus()}}}function edInsertLink(d,c,b){if(&quot;object&quot;==typeof(wpLink)){wpLink.open()}
 else{if(!b){b=&quot;http://&quot;}if(!edCheckOpenTags(c)){var a=prompt(quicktagsL10n.enterURL,b);if(a){edButtons[c].tagStart='&lt;a href=&quot;'+a+'&quot;&gt;';edInsertTag(d,c)}}else{edInsertTag(d,c)}}}function edInsertImage(b){var a=prompt(quicktagsL10n.enterImageURL,&quot;http://&quot;);if(a){a='&lt;img src=&quot;'+a+'&quot; alt=&quot;'+prompt(quicktagsL10n.enterImageDescription,&quot;&quot;)+'&quot; /&gt;';edInsertContent(b,a)}}var QTags=function(a,c,b,f){var j=this,k=document.getElementById(b),g,l,e,h,d;j.Buttons=[];j.Links=[];j.OpenTags=[];j.Canvas=document.getElementById(c);if(!j.Canvas||!k){return}f=(typeof f!=&quot;undefined&quot;)?&quot;,&quot;+f+&quot;,&quot;:&quot;&quot;;j.edShowButton=function(n,m){if(f&amp;&amp;(f.indexOf(&quot;,&quot;+n.display+&quot;,&quot;)!=-1)){return&quot;&quot;}else{if(n.id==a+&quot;_img&quot;){return'&lt;input type=&quot;button&quot; id=&quot;'+n.id+'&quot; accesskey=&quot;'+n.access+'&quot; class=&quot;ed_button&quot; onclick=&quot;edIn
 sertImage('+a+'.Canvas);&quot; value=&quot;'+n.display+'&quot; /&gt;'}else{if(n.id==a+&quot;_link&quot;){return'&lt;input type=&quot;button&quot; id=&quot;'+n.id+'&quot; accesskey=&quot;'+n.access+'&quot; class=&quot;ed_button&quot; onclick=&quot;'+a+&quot;.edInsertLink(&quot;+m+');&quot; value=&quot;'+n.display+'&quot; /&gt;'}else{return'&lt;input type=&quot;button&quot; id=&quot;'+n.id+'&quot; accesskey=&quot;'+n.access+'&quot; class=&quot;ed_button&quot; onclick=&quot;'+a+&quot;.edInsertTag(&quot;+m+');&quot; value=&quot;'+n.display+'&quot; /&gt;'}}}};j.edAddTag=function(i){if(j.Buttons[i].tagEnd!=&quot;&quot;){j.OpenTags[j.OpenTags.length]=i;document.getElementById(j.Buttons[i].id).value=&quot;/&quot;+document.getElementById(j.Buttons[i].id).value}};j.edRemoveTag=function(i){for(g=0;g&lt;j.OpenTags.length;g++){if(j.OpenTags[g]==i){j.OpenTags.splice(g,1);document.getElementById(j.Buttons[i].id).value=document.getElementById(j.Buttons[i].id).value.replace(&quot;/&quot;,&qu
 ot;&quot;)}}};j.edCheckOpenTags=function(n){l=0;for(var m=0;m&lt;j.OpenTags.length;m++){if(j.OpenTags[m]==n){l++}}if(l&gt;0){return true}else{return false}};this.edCloseAllTags=function(){var i=j.OpenTags.length;for(var m=0;m&lt;i;m++){j.edInsertTag(j.OpenTags[j.OpenTags.length-1])}};this.edQuickLink=function(o,p){if(o&gt;-1){var n=&quot;&quot;,m;if(Links[o].newWin==1){n=' target=&quot;_blank&quot;'}m='&lt;a href=&quot;'+Links[o].URL+'&quot;'+n+&quot;&gt;&quot;+Links[o].display+&quot;&lt;/a&gt;&quot;;p.selectedIndex=0;edInsertContent(j.Canvas,m)}else{p.selectedIndex=0}};j.edInsertTag=function(o){if(document.selection){j.Canvas.focus();d=document.selection.createRange();if(d.text.length&gt;0){d.text=j.Buttons[o].tagStart+d.text+j.Buttons[o].tagEnd}else{if(!j.edCheckOpenTags(o)||j.Buttons[o].tagEnd==&quot;&quot;){d.text=j.Buttons[o].tagStart;j.edAddTag(o)}else{d.text=j.Buttons[o].tagEnd;j.edRemoveTag(o)}}j.Canvas.focus()}else{if(j.Canvas.selectionStart||j.Canvas.selectionStart
 ==&quot;0&quot;){var n=j.Canvas.selectionStart,m=j.Canvas.selectionEnd,q=m,p=j.Canvas.scrollTop;if(n!=m){j.Canvas.value=j.Canvas.value.substring(0,n)+j.Buttons[o].tagStart+j.Canvas.value.substring(n,m)+j.Buttons[o].tagEnd+j.Canvas.value.substring(m,j.Canvas.value.length);q+=j.Buttons[o].tagStart.length+j.Buttons[o].tagEnd.length}else{if(!j.edCheckOpenTags(o)||j.Buttons[o].tagEnd==&quot;&quot;){j.Canvas.value=j.Canvas.value.substring(0,n)+j.Buttons[o].tagStart+j.Canvas.value.substring(m,j.Canvas.value.length);j.edAddTag(o);q=n+j.Buttons[o].tagStart.length}else{j.Canvas.value=j.Canvas.value.substring(0,n)+j.Buttons[o].tagEnd+j.Canvas.value.substring(m,j.Canvas.value.length);j.edRemoveTag(o);q=n+j.Buttons[o].tagEnd.length}}j.Canvas.focus();j.Canvas.selectionStart=q;j.Canvas.selectionEnd=q;j.Canvas.scrollTop=p}else{if(!j.edCheckOpenTags(o)||j.Buttons[o].tagEnd==&quot;&quot;){j.Canvas.value+=Buttons[o].tagStart;j.edAddTag(o)}else{j.Canvas.value+=Buttons[o].tagEnd;j.edRemoveTag(o)
 }j.Canvas.focus()}}};this.edInsertLink=function(o,n){if(!n){n=&quot;http://&quot;}if(!j.edCheckOpenTags(o)){var m=prompt(quicktagsL10n.enterURL,n);if(m){j.Buttons[o].tagStart='&lt;a href=&quot;'+m+'&quot;&gt;';j.edInsertTag(o)}}else{j.edInsertTag(o)}};this.edInsertImage=function(){var i=prompt(quicktagsL10n.enterImageURL,&quot;http://&quot;);if(i){i='&lt;img src=&quot;'+i+'&quot; alt=&quot;'+prompt(quicktagsL10n.enterImageDescription,&quot;&quot;)+'&quot; /&gt;';edInsertContent(j.Canvas,i)}};j.Buttons[j.Buttons.length]=new edButton(a+&quot;_strong&quot;,&quot;b&quot;,&quot;&lt;strong&gt;&quot;,&quot;&lt;/strong&gt;&quot;,&quot;b&quot;);j.Buttons[j.Buttons.length]=new edButton(a+&quot;_em&quot;,&quot;i&quot;,&quot;&lt;em&gt;&quot;,&quot;&lt;/em&gt;&quot;,&quot;i&quot;);j.Buttons[j.Buttons.length]=new edButton(a+&quot;_link&quot;,&quot;link&quot;,&quot;&quot;,&quot;&lt;/a&gt;&quot;,&quot;a&quot;);j.Buttons[j.Buttons.length]=new edButton(a+&quot;_block&quot;,&quot;b-quote&quot;
 ,&quot;\n\n&lt;blockquote&gt;&quot;,&quot;&lt;/blockquote&gt;\n\n&quot;,&quot;q&quot;);j.Buttons[j.Buttons.length]=new edButton(a+&quot;_del&quot;,&quot;del&quot;,'&lt;del datetime=&quot;'+datetime+'&quot;&gt;',&quot;&lt;/del&gt;&quot;,&quot;d&quot;);j.Buttons[j.Buttons.length]=new edButton(a+&quot;_ins&quot;,&quot;ins&quot;,'&lt;ins datetime=&quot;'+datetime+'&quot;&gt;',&quot;&lt;/ins&gt;&quot;,&quot;s&quot;);j.Buttons[j.Buttons.length]=new edButton(a+&quot;_img&quot;,&quot;img&quot;,&quot;&quot;,&quot;&quot;,&quot;m&quot;,-1);j.Buttons[j.Buttons.length]=new edButton(a+&quot;_ul&quot;,&quot;ul&quot;,&quot;&lt;ul&gt;\n&quot;,&quot;&lt;/ul&gt;\n\n&quot;,&quot;u&quot;);j.Buttons[j.Buttons.length]=new edButton(a+&quot;_ol&quot;,&quot;ol&quot;,&quot;&lt;ol&gt;\n&quot;,&quot;&lt;/ol&gt;\n\n&quot;,&quot;o&quot;);j.Buttons[j.Buttons.length]=new edButton(a+&quot;_li&quot;,&quot;li&quot;,&quot;\t&lt;li&gt;&quot;,&quot;&lt;/li&gt;\n&quot;,&quot;l&quot;);j.Buttons[j.Buttons.length]=ne
 w edButton(a+&quot;_code&quot;,&quot;code&quot;,&quot;&lt;code&gt;&quot;,&quot;&lt;/code&gt;&quot;,&quot;c&quot;);j.Buttons[j.Buttons.length]=new edButton(a+&quot;_more&quot;,&quot;more&quot;,&quot;&lt;!--more--&gt;&quot;,&quot;&quot;,&quot;t&quot;,-1);e=document.createElement(&quot;div&quot;);e.id=a+&quot;_qtags&quot;;h='&lt;div id=&quot;'+a+'_toolbar&quot;&gt;';for(g=0;g&lt;j.Buttons.length;g++){h+=j.edShowButton(j.Buttons[g],g)}h+='&lt;input type=&quot;button&quot; id=&quot;'+a+'_ed_spell&quot; class=&quot;ed_button&quot; onclick=&quot;edSpell('+a+'.Canvas);&quot; title=&quot;'+quicktagsL10n.dictionaryLookup+'&quot; value=&quot;'+quicktagsL10n.lookup+'&quot; /&gt;';h+='&lt;input type=&quot;button&quot; id=&quot;'+a+'_ed_close&quot; class=&quot;ed_button&quot; onclick=&quot;'+a+'.edCloseAllTags();&quot; title=&quot;'+quicktagsL10n.closeAllOpenTags+'&quot; value=&quot;'+quicktagsL10n.closeTags+'&quot; /&gt;&lt;/div&gt;';e.innerHTML=h;k.parentNode.insertBefore(e,k)};
</del><span class="cx">\ No newline at end of file
</span><ins>+var QTags,edButtons,edButton;function quicktags(a){return new QTags(a)}(function(){var c=function(h){var g,f,e;if(typeof jQuery!=&quot;undefined&quot;){jQuery(document).ready(h)}else{g=c;g.funcs=[];g.ready=function(){if(!g.isReady){g.isReady=true;for(f=0;f&lt;g.funcs.length;f++){g.funcs[f]()}}};if(g.isReady){h()}else{g.funcs.push(h)}if(!g.eventAttached){if(document.addEventListener){e=function(){document.removeEventListener(&quot;DOMContentLoaded&quot;,e,false);g.ready()};document.addEventListener(&quot;DOMContentLoaded&quot;,e,false);window.addEventListener(&quot;load&quot;,g.ready,false)}else{if(document.attachEvent){e=function(){if(document.readyState===&quot;complete&quot;){document.detachEvent(&quot;onreadystatechange&quot;,e);g.ready()}};document.attachEvent(&quot;onreadystatechange&quot;,e);window.attachEvent(&quot;onload&quot;,g.ready);(function(){try{document.documentElement.doScroll(&quot;left&quot;)}catch(i){setTimeout(arguments.callee,50);return}g.rea
 dy()})()}}g.eventAttached=true}}},a=(function(){var e=new Date(),f;f=function(g){var h=g.toString();if(h.length&lt;2){h=&quot;0&quot;+h}return h};return e.getUTCFullYear()+&quot;-&quot;+f(e.getUTCMonth()+1)+&quot;-&quot;+f(e.getUTCDate())+&quot;T&quot;+f(e.getUTCHours())+&quot;:&quot;+f(e.getUTCMinutes())+&quot;:&quot;+f(e.getUTCSeconds())+&quot;+00:00&quot;})(),b={},d;d=QTags=function(j){if(typeof(j)==&quot;string&quot;){j={quicktags_id:j}}else{if(typeof(j)!=&quot;object&quot;){return false}}var r=this,f=j.quicktags_id,p={},o={},h=document.getElementById(f),e=&quot;qt_&quot;+f,n=&quot;&quot;,m,k,l,g,q;if(!f||!h){return false}r.name=e;r.id=f;for(m in edButtons){p[edButtons[m].id]=edButtons[m]}if(f==&quot;content&quot;&amp;&amp;adminpage&amp;&amp;(adminpage==&quot;post-new-php&quot;||adminpage==&quot;post-php&quot;)){p.fullscreen=new d.FullscreenButton()}for(m in r._customButtons){p[m]=new r._customButtons[m]()}if(j.quicktags_buttons){l=j.quicktags_buttons.split(&quot;,&quot;
 );for(m in l){g=l[m];if(p[g]){o[g]=p[g]}}}else{o=p}if(j.quicktags_disabled_buttons){l=j.quicktags_disabled_buttons.split(&quot;,&quot;);for(m in l){g=l[m];if(o[g]){delete (o[g])}}}for(m in o){n+=o[m].html(e+&quot;_&quot;)}k=document.createElement(&quot;div&quot;);k.id=e+&quot;_toolbar&quot;;k.className=&quot;quicktags-toolbar&quot;;h.parentNode.insertBefore(k,h);k.innerHTML=n;r.toolbar=k;q=function(u){u=u||window.event;var t=u.target||u.srcElement,s;if(/\s+ed_button\s+/.test(&quot; &quot;+t.className+&quot; &quot;)){r.canvas=h=document.getElementById(f);s=t.id.replace(e+&quot;_&quot;,&quot;&quot;);if(o[s]){o[s].callback.call(o[s],t,h,r)}}};if(k.addEventListener){k.addEventListener(&quot;click&quot;,q,false)}else{if(k.attachEvent){k.attachEvent(&quot;onclick&quot;,q)}}d.instances[f]=r};d.instances={};d.registerButton=function(f,e){b[f]=e};d.getInstance=function(e){return d.instances[e]};d.insertContent=function(l,h){var i,g,f,j,k,e=document.getElementById(l);if(document.selec
 tion){e.focus();i=document.selection.createRange();i.text=h;e.focus()}else{if(e.selectionStart||e.selectionStart==&quot;0&quot;){k=e.value;g=e.selectionStart;f=e.selectionEnd;j=e.scrollTop;e.value=k.substring(0,g)+h+k.substring(f,k.length);e.focus();e.selectionStart=g+h.length;e.selectionEnd=g+h.length;e.scrollTop=j}else{e.value+=h;e.focus()}}};d.Button=function(i,g,e,h){var f=this;f.id=i;f.display=g;f.access=e;f.title=h||&quot;&quot;};d.Button.prototype.html=function(f){var e=this.access?' accesskey=&quot;'+this.access+'&quot;':&quot;&quot;;return'&lt;input type=&quot;button&quot; id=&quot;'+f+this.id+'&quot;'+e+' class=&quot;ed_button&quot; title=&quot;'+this.title+'&quot; value=&quot;'+this.display+'&quot; /&gt;'};d.Button.prototype.callback=function(e){};d.TagButton=function(l,j,g,f,e,h,k){var i=this;d.Button.call(i,l,j,e,k);i.tagStart=g;i.tagEnd=f;i.open=h};d.TagButton.prototype=new d.Button();d.TagButton.prototype.openTag=function(h,f){var g=this;if(!f.openTags){f.open
 Tags=[]}if(g.tagEnd){f.openTags.push(g.id);h.value=&quot;/&quot;+h.value}};d.TagButton.prototype.closeTag=function(j,f){var h=this,g=h.isOpen(f);if(g!==false){f.openTags.splice(g,1)}j.value=h.display};d.TagButton.prototype.isOpen=function(e){var h=this,g=0,f=false;if(e.openTags){while(f===false&amp;&amp;g&lt;e.openTags.length){f=e.openTags[g]==h.id?g:false;g++}}else{f=false}return f};d.TagButton.prototype.callback=function(o,j,q){var u=this,p,f,m,h,s,k,e,n,g;s=j.value;if(document.selection){j.focus();g=document.selection.createRange();if(g.text.length&gt;0){g.text=u.tagStart+g.text+u.tagEnd}else{if(u.isOpen(q)===false||u.tagEnd===&quot;&quot;){g.text=u.tagStart;u.openTag(o,q)}else{g.text=u.tagEnd;u.closeTag(o,q)}}j.focus()}else{if(j.selectionStart||j.selectionStart==&quot;0&quot;){p=j.selectionStart;f=j.selectionEnd;m=f;h=j.scrollTop;k=s.substring(0,p);e=s.substring(f,s.length);n=s.substring(p,f);if(p!=f){j.value=k+u.tagStart+n+u.tagEnd+e;if(u.tagEnd===&quot;&quot;){m=p}m+=u
 .tagStart.length+u.tagEnd.length}else{if(u.isOpen(q)===false||u.tagEnd===&quot;&quot;){j.value=k+u.tagStart+e;u.openTag(o,q);m=p+u.tagStart.length}else{j.value=k+u.tagEnd+e;m=p+u.tagEnd.length;u.closeTag(o,q)}}j.focus();j.selectionStart=m;j.selectionEnd=m;j.scrollTop=h}else{if(u.isOpen(q)!==false||u.tagEnd===&quot;&quot;){j.value+=u.tagStart;u.openTag(o,q)}else{j.value+=u.tagEnd;u.closeTag(o,q)}j.focus()}}};d.SpellButton=function(){d.Button.call(this,&quot;spell&quot;,quicktagsL10n.lookup,&quot;&quot;,quicktagsL10n.dictionaryLookup)};d.SpellButton.prototype=new d.Button();d.SpellButton.prototype.callback=function(h,g,i){var k=&quot;&quot;,j,f,e;if(document.selection){g.focus();j=document.selection.createRange();if(j.text.length&gt;0){k=j.text}}else{if(g.selectionStart||g.selectionStart==&quot;0&quot;){f=g.selectionStart;e=g.selectionEnd;if(f!=e){k=g.value.substring(f,e)}}}if(k===&quot;&quot;){k=prompt(quicktagsL10n.wordLookup,&quot;&quot;)}if(k!==null&amp;&amp;/^\w[\w ]*$/.t
 est(k)){window.open(&quot;http://www.answers.com/&quot;+encodeURIComponent(k))}};d.CloseButton=function(){d.Button.call(this,&quot;close&quot;,quicktagsL10n.closeTags,&quot;&quot;,quicktagsL10n.closeAllOpenTags)};d.CloseButton.prototype=new d.Button();d.CloseButton.prototype.callback=function(j,k,f){var h,g,i=f.openTags;if(i){while(i.length&gt;0){h=f.getButton(i[i.length-1]);g=document.getElementById(f.name+&quot;_&quot;+h.id);h.callback.call(h,g,k,f)}}};d.prototype.closeAllTags=function(){var e=this.getButton(&quot;close&quot;);e.callback.call(e,&quot;&quot;,this.canvas,this.toolbar)};d.LinkButton=function(){d.TagButton.call(this,&quot;link&quot;,&quot;link&quot;,&quot;&quot;,&quot;&lt;/a&gt;&quot;,&quot;a&quot;)};d.LinkButton.prototype=new d.TagButton();d.LinkButton.prototype.callback=function(j,k,h,g){var f,i=this;if(typeof(wpLink)!=&quot;undefined&quot;){wpLink.open();return}if(!g){g=&quot;http://&quot;}if(i.isOpen(h)===false){f=prompt(quicktagsL10n.enterURL,g);if(f){i.t
 agStart='&lt;a href=&quot;'+f+'&quot;&gt;';d.TagButton.prototype.callback.call(i,j,k,h)}}else{d.TagButton.prototype.callback.call(i,j,k,h)}};d.ImgButton=function(){d.TagButton.call(this,&quot;img&quot;,&quot;img&quot;,&quot;&quot;,&quot;&quot;,&quot;m&quot;,-1)};d.ImgButton.prototype=new d.TagButton();d.ImgButton.prototype.callback=function(i,k,g,f){if(!f){f=&quot;http://&quot;}var j=prompt(quicktagsL10n.enterImageURL,f),h;if(j){h=prompt(quicktagsL10n.enterImageDescription,&quot;&quot;);this.tagStart='&lt;img src=&quot;'+j+'&quot; alt=&quot;'+h+'&quot; /&gt;';d.TagButton.prototype.callback.call(this,i,k,g)}};d.FullscreenButton=function(){d.Button.call(this,&quot;fullscreen&quot;,quicktagsL10n.fullscreen,&quot;f&quot;,quicktagsL10n.toggleFullscreen)};d.FullscreenButton.prototype=new d.Button();d.FullscreenButton.prototype.callback=function(f,g){if(g.id!=&quot;content&quot;||typeof(fullscreen)==&quot;undefined&quot;){return}fullscreen.on()};edButtons=[new d.TagButton(&quot;str
 ong&quot;,&quot;b&quot;,&quot;&lt;strong&gt;&quot;,&quot;&lt;/strong&gt;&quot;,&quot;b&quot;),new d.TagButton(&quot;em&quot;,&quot;i&quot;,&quot;&lt;em&gt;&quot;,&quot;&lt;/em&gt;&quot;,&quot;i&quot;),new d.LinkButton(),new d.TagButton(&quot;block&quot;,&quot;b-quote&quot;,&quot;\n\n&lt;blockquote&gt;&quot;,&quot;&lt;/blockquote&gt;\n\n&quot;,&quot;q&quot;),new d.TagButton(&quot;del&quot;,&quot;del&quot;,'&lt;del datetime=&quot;'+a+'&quot;&gt;',&quot;&lt;/del&gt;&quot;,&quot;d&quot;),new d.TagButton(&quot;ins&quot;,&quot;ins&quot;,'&lt;ins datetime=&quot;'+a+'&quot;&gt;',&quot;&lt;/ins&gt;&quot;,&quot;s&quot;),new d.ImgButton(),new d.TagButton(&quot;ul&quot;,&quot;ul&quot;,&quot;&lt;ul&gt;\n&quot;,&quot;&lt;/ul&gt;\n\n&quot;,&quot;u&quot;),new d.TagButton(&quot;ol&quot;,&quot;ol&quot;,&quot;&lt;ol&gt;\n&quot;,&quot;&lt;/ol&gt;\n\n&quot;,&quot;o&quot;),new d.TagButton(&quot;li&quot;,&quot;li&quot;,&quot;\t&lt;li&gt;&quot;,&quot;&lt;/li&gt;\n&quot;,&quot;l&quot;),new d.TagButt
 on(&quot;code&quot;,&quot;code&quot;,&quot;&lt;code&gt;&quot;,&quot;&lt;/code&gt;&quot;,&quot;c&quot;),new d.TagButton(&quot;more&quot;,&quot;more&quot;,&quot;&lt;!--more--&gt;&quot;,&quot;&quot;,&quot;t&quot;,-1),new d.SpellButton(),new d.CloseButton()];edButton=d.TagButton})();
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (18496 => 18497)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2011-08-03 01:54:29 UTC (rev 18496)
+++ trunk/wp-includes/script-loader.php        2011-08-03 10:11:12 UTC (rev 18497)
</span><span class="lines">@@ -67,9 +67,8 @@
</span><span class="cx"> 
</span><span class="cx">         $scripts-&gt;add( 'sack', &quot;/wp-includes/js/tw-sack$suffix.js&quot;, false, '1.6.1', 1 );
</span><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'quicktags', &quot;/wp-includes/js/quicktags$suffix.js&quot;, false, '20110502', 1 );
</del><ins>+        $scripts-&gt;add( 'quicktags', &quot;/wp-includes/js/quicktags$suffix.js&quot;, false, '20110802', 1 );
</ins><span class="cx">         $scripts-&gt;add_script_data( 'quicktags', 'quicktagsL10n', array(
</span><del>-                'quickLinks' =&gt; __('(Quick Links)'),
</del><span class="cx">                 'wordLookup' =&gt; __('Enter a word to look up:'),
</span><span class="cx">                 'dictionaryLookup' =&gt; esc_attr(__('Dictionary lookup')),
</span><span class="cx">                 'lookup' =&gt; esc_attr(__('lookup')),
</span><span class="lines">@@ -265,7 +264,7 @@
</span><span class="cx"> 
</span><span class="cx">                 $scripts-&gt;add( 'admin-custom-fields', &quot;/wp-admin/js/custom-fields$suffix.js&quot;, array('wp-lists'), '20110429', 1 );
</span><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'admin-comments', &quot;/wp-admin/js/edit-comments$suffix.js&quot;, array('wp-lists', 'jquery-ui-resizable', 'quicktags', 'jquery-query'), '20110602', 1 );
</del><ins>+                $scripts-&gt;add( 'admin-comments', &quot;/wp-admin/js/edit-comments$suffix.js&quot;, array('wp-lists', 'jquery-ui-resizable', 'quicktags', 'jquery-query'), '20110802', 1 );
</ins><span class="cx">                 $scripts-&gt;add_script_data( 'admin-comments', 'adminCommentsL10n', array(
</span><span class="cx">                         'hotkeys_highlight_first' =&gt; isset($_GET['hotkeys_highlight_first']),
</span><span class="cx">                         'hotkeys_highlight_last' =&gt; isset($_GET['hotkeys_highlight_last']),
</span></span></pre>
</div>
</div>

</body>
</html>