r79761 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79760‎ | r79761 | r79762 >
Date:21:36, 6 January 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Use data instead of wholeText for IE compatibility
Modified paths:
  • /trunk/extensions/LiveTranslate/includes/ext.livetranslate.js (modified) (history)

Diff [purge]

Index: trunk/extensions/LiveTranslate/includes/ext.livetranslate.js
@@ -209,10 +209,10 @@
210210
211211 element.contents().each( function() {
212212 // If it's a text node, then translate it.
213 - if ( this.nodeType == 3 && this.wholeText.trim().length > 0 ) {
 213+ if ( this.nodeType == 3 && this.data != undefined && this.data.trim().length > 0 ) {
214214 runningJobs++;
215215 translateChunk(
216 - this.wholeText.split( new RegExp( "(\\S.+?[.!?])(?=\\s+|$)", "gi" ) ),
 216+ this.data.split( new RegExp( "(\\S.+?[.!?])(?=\\s+|$)", "gi" ) ),
217217 [],
218218 maxChunkLength,
219219 sourceLang,

Follow-up revisions

RevisionCommit summaryAuthorDate
r79771follow up to r79761jeroendedauw22:56, 6 January 2011
r79772follow up to r79761jeroendedauw23:16, 6 January 2011
r79775follow up to r79761jeroendedauw23:43, 6 January 2011

Status & tagging log