Kill whitespaces in some javascript files.
authorAntoine Musso <hashar@users.mediawiki.org>
Sat, 3 Feb 2007 21:53:56 +0000 (21:53 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sat, 3 Feb 2007 21:53:56 +0000 (21:53 +0000)
skins/common/IEFixes.js
skins/common/ajaxsearch.js
skins/common/metadata.js
skins/common/preview.js
skins/common/protect.js
skins/common/sticky.js
skins/common/wikibits.js

index 9c25adf..f85f506 100644 (file)
@@ -33,7 +33,7 @@ function fixalpha() {
 
         if (imageUrl.substr(imageUrl.length-4).toLowerCase() == '.png') {
             var logospan = logoa.appendChild(document.createElement('span'));
-           
+
             logoa.style.backgroundImage = 'none';
             logospan.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=' + imageUrl + ')';
             logospan.style.height = '100%';
@@ -41,7 +41,7 @@ function fixalpha() {
             logospan.style.width = logoa.currentStyle.width;
             logospan.style.cursor = 'hand';
             // Center image with hack for IE5.5
-            if (document.documentElement.dir == "rtl") 
+            if (document.documentElement.dir == "rtl")
             {
               logospan.style.right = '50%';
               logospan.style.setExpression('marginRight', '"-" + (this.offsetWidth / 2) + "px"');
@@ -53,7 +53,7 @@ function fixalpha() {
             }
             logospan.style.top = '50%';
             logospan.style.setExpression('marginTop', '"-" + (this.offsetHeight / 2) + "px"');
+
             var linkFix = logoa.appendChild(logoa.cloneNode());
             linkFix.style.position = 'absolute';
             linkFix.style.height = '100%';
@@ -124,4 +124,4 @@ onafterprint = function()
     for (var i=0; i < expandedURLs.length; i++)
         if (expandedURLs[i])
             expandedURLs[i].removeNode(true);
-}
\ No newline at end of file
+}
index 01916d9..1e97223 100644 (file)
@@ -44,7 +44,7 @@ function Searching_SetResult( request )
                alert("Error: " + request.status + " " + request.statusText + ": " + request.responseText);
                return;
        }
-       
+
        var result = request.responseText;
 
         //body.innerHTML = result;
@@ -90,7 +90,7 @@ function Searching_Call()
                {
                        return;
                }
-               
+
                sajax_do_call( "wfSajaxSearch", [ x ], Searching_SetResult );
        }
 }
index 9f7a8e0..a73b693 100644 (file)
@@ -11,17 +11,17 @@ function attachMetadataToggle(tableId, showText, hideText) {
                var box = document.getElementById(tableId);
                if (!box)
                        return false;
-               
+
                var tbody = box.getElementsByTagName('tbody')[0];
-               
+
                var row = document.createElement('tr');
-               
+
                var col = document.createElement('td');
                col.colSpan = 2;
-               
+
                var link = document.createElement('a');
                link.href = '#';
-               
+
                link.onclick = function() {
                        if (box.className == 'mw_metadata collapsed') {
                                changeText(link, hideText);
@@ -32,17 +32,17 @@ function attachMetadataToggle(tableId, showText, hideText) {
                        }
                        return false;
                }
-               
+
                var text = document.createTextNode(hideText);
-               
+
                link.appendChild(text);
                col.appendChild(link);
                row.appendChild(col);
                tbody.appendChild(row);
-               
+
                // And collapse!
                link.onclick();
-               
+
                return true;
        }
        return false;
index b117e85..aaa57bc 100644 (file)
@@ -24,10 +24,10 @@ function livePreview(target, text, postUrl) {
        }
        prevReq = openXMLHttpRequest();
        if( !prevReq ) return false;
-       
+
        prevReq.onreadystatechange = updatePreviewText;
        prevReq.open("POST", postUrl, true);
-       
+
        var postData = 'wpTextbox1=' + encodeURIComponent(text);
        prevReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
        prevReq.send(postData);
index 4baa5e4..8968607 100644 (file)
@@ -3,29 +3,29 @@ function protectInitialize(tableId, labelText) {
                var box = document.getElementById(tableId);
                if (!box)
                        return false;
-               
+
                var tbody = box.getElementsByTagName('tbody')[0];
                var row = document.createElement('tr');
                tbody.appendChild(row);
-               
+
                row.appendChild(document.createElement('td'));
                var col2 = document.createElement('td');
                row.appendChild(col2);
-               
+
                var check = document.createElement('input');
                check.id = "mwProtectUnchained";
                check.type = "checkbox";
                check.onclick = protectChainUpdate;
                col2.appendChild(check);
-               
+
                var space = document.createTextNode(" ");
                col2.appendChild(space);
-               
+
                var label = document.createElement('label');
                label.setAttribute("for", "mwProtectUnchained");
                label.appendChild(document.createTextNode(labelText));
                col2.appendChild(label);
-               
+
                if (protectAllMatch()) {
                        check.checked = false;
                        protectEnable(false);
@@ -33,7 +33,7 @@ function protectInitialize(tableId, labelText) {
                        check.checked = true;
                        protectEnable(true);
                }
-               
+
                return true;
        }
        return false;
index cf248c3..a4904c0 100644 (file)
@@ -36,7 +36,7 @@ lastY=10;YOffset=0;staticYOffset=10;refreshMS=25;
 // emulate css 'position: fixed' in IE5+ Win
 // code by aclover@1value.com
        fix_elements = new Array();
-       
+
        function fix_event(){
                var i;
                for (i=0; i < fix_elements.length; i++){
@@ -95,7 +95,7 @@ lastY=10;YOffset=0;staticYOffset=10;refreshMS=25;
                else if(document.all){this.css=document.all[eID].style;}
                return this
        }
-       
+
        function checkBrowser(){
                this.ver=navigator.appVersion;
                this.name=navigator.appName;
@@ -112,13 +112,13 @@ lastY=10;YOffset=0;staticYOffset=10;refreshMS=25;
                this.standards=document.getElementById?true:false;
                this.dhtml=this.standards||this.ie4||this.ns4;
        }
-       
+
        function showMe(eID){
                myFloater=new makeLayerObj(eID)
                myFloater.css.visibility="visible";
        }
-       
+
        function hideMe(eID){
                myFloater=new makeLayerObj(eID)
                myFloater.css.visibility="hidden";
-       }
\ No newline at end of file
+       }
index 06f9b9f..cf53694 100644 (file)
@@ -356,7 +356,7 @@ function mwInsertEditButton(parent, item) {
                insertTags(item.tagOpen, item.tagClose, item.sampleText);
                return false;
        };
-       
+
        parent.appendChild(image);
        return true;
 }
@@ -367,13 +367,13 @@ function mwSetupToolbar() {
 
        var textbox = document.getElementById('wpTextbox1');
        if (!textbox) { return false; }
-       
+
        // Don't generate buttons for browsers which don't fully
        // support it.
        if (!document.selection && textbox.selectionStart === null) {
                return false;
        }
-       
+
        for (var i in mwEditButtons) {
                mwInsertEditButton(toolbar, mwEditButtons[i]);
        }
@@ -1030,7 +1030,7 @@ function ts_getInnerText(el) {
        if (typeof el == "undefined") { return el };
        if (el.innerText) return el.innerText;  // Not needed but it is faster
        var str = "";
-       
+
        var cs = el.childNodes;
        var l = cs.length;
        for (var i = 0; i < l; i++) {
@@ -1107,8 +1107,8 @@ function ts_resortTable(lnk) {
        } else {
                        arrowHTML = '<img src="'+ ts_image_path + ts_image_up + '" alt="&uarr;"/>';
                        span.setAttribute('sortdir','down');
-       } 
-       
+       }
+
        // We appendChild rows that already exist to the tbody, so it moves them rather than creating new ones
        // don't do sortbottom rows
        for (var i = 0; i < newRows.length; i++) {
@@ -1189,13 +1189,13 @@ function ts_sort_currency(a,b) {
        var bb = ts_parseFloat(b[1].replace(/[^0-9.]/g,''));
        return (aa != bb ? aa - bb : a[2] - b[2]);
 }
+
 function ts_sort_numeric(a,b) {
        var aa = ts_parseFloat(a[1]);
        var bb = ts_parseFloat(b[1]);
        return (aa != bb ? aa - bb : a[2] - b[2]);
 }
+
 function ts_sort_caseinsensitive(a,b) {
        var aa = a[1].toLowerCase();
        var bb = b[1].toLowerCase();