r105393 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105392‎ | r105393 | r105394 >
Date:00:36, 7 December 2011
Author:preilly
Status:ok
Tags:
Comment:
remove unneeded space
Modified paths:
  • /trunk/extensions/MobileFrontend/javascripts/beta_opensearch.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/javascripts/beta_opensearch.js
@@ -1,7 +1,7 @@
22 var apiUrl = '/api.php';
33
44 if ( scriptPath ) {
5 - apiUrl = scriptPath + apiUrl;
 5+ apiUrl = scriptPath + apiUrl;
66 }
77
88 var timer = -1;
@@ -32,11 +32,11 @@
3333 ol.sqLeft = sq.offsetLeft;
3434 ol.sqTop = sq.offsetTop;
3535 sq.style.position = 'absolute';
36 -
 36+
3737 if ( !ol.properOffsetWidth ) {
3838 ol.properOffsetWidth = search.offsetLeft + 44;
3939 }
40 -
 40+
4141 sq.className = '';
4242 sq.style.left = sb.offsetLeft + pixels;
4343 sq.style.top = sb.offsetTop + pixels;
@@ -88,7 +88,7 @@
8989
9090 var removeResults = document.getElementById( 'remove-results' );
9191 if ( !removeResults ) {
92 - rrd = document.createElement( 'a' );
 92+ rrd = document.createElement( 'a' );
9393 rrd.setAttribute( 'href', '#' );
9494 rrd.setAttribute( 'id', 'remove-results' );
9595 rrd.setAttribute( 'onclick', 'removeResults();' );
@@ -157,7 +157,7 @@
158158 whichElement(event);
159159 }
160160
161 -function whichElement( e ) {
 161+function whichElement( e ) {
162162 var targ;
163163 if ( !e ) {
164164 var e = window.event;
@@ -167,15 +167,15 @@
168168 } else if ( e.srcElement ) {
169169 targ = e.srcElement;
170170 }
171 -
 171+
172172 if ( targ.nodeType == 3 ) {
173173 targ = targ.parentNode;
174174 }
175 -
 175+
176176 e.cancelBubble = true;
177177 e.stopPropagation();
178 - if ( targ.className == "suggestion-result" ||
179 - targ.className == "search-result-item" ||
 178+ if ( targ.className == "suggestion-result" ||
 179+ targ.className == "search-result-item" ||
180180 targ.className == "suggestions-result" ||
181181 targ.className == "sq-val-update" ||
182182 targ.id == 'results' ||
@@ -202,7 +202,7 @@
203203 if ( results ) {
204204 results.style.width = ( sq.offsetWidth - 2 ) + pixels;
205205 results.style.left = sq.offsetLeft + pixels;
206 - results.style.top = ( sq.offsetTop + sq.offsetHeight ) + pixels;
 206+ results.style.top = ( sq.offsetTop + sq.offsetHeight ) + pixels;
207207 if ( results.style.display == 'block' ) {
208208 focused = false;
209209 search.blur();
@@ -298,7 +298,7 @@
299299 }
300300 if ( !sections || sections.length < 1 ) {
301301 results.innerHTML = "<div class=\"suggestions-results\" title=\"No Results\">No Results</div>";
302 - } else {
 302+ } else {
303303 var html = '<div class="suggestions-results">';
304304 for ( i = 0; i < sections.length; i++ ) {
305305 var section = sections[i];

Status & tagging log