( document.childNodes && !document.all && !navigator.taintEnabled );
// For accesskeys; note that FF3+ is included here!
var is_ff2 = /firefox\/[2-9]|minefield\/3/.test( clientPC );
+var is_ff2_ = /firefox\/2/.test( clientPC );
// These aren't used here, but some custom scripts rely on them
var is_ff2_win = is_ff2 && clientPC.indexOf('windows') != -1;
var is_ff2_x11 = is_ff2 && clientPC.indexOf('x11') != -1;
}
function importScript(page) {
+ // TODO: might want to introduce a utility function to match wfUrlencode() in PHP
var uri = wgScript + '?title=' +
- encodeURIComponent(page.replace(/ /g,'_')).replace('%2F','/').replace('%3A',':') +
+ encodeURIComponent(page.replace(/ /g,'_')).replace(/%2F/ig,'/').replace(/%3A/ig,':') +
'&action=raw&ctype=text/javascript';
return importScriptURI(uri);
}
importStylesheetURI(stylepath+'/'+skin+'/Opera6Fixes.css');
} else if (is_opera_seven && !is_opera_95) {
importStylesheetURI(stylepath+'/'+skin+'/Opera7Fixes.css');
+ } else if (is_opera_95) {
+ importStylesheetURI(stylepath+'/'+skin+'/Opera9Fixes.css');
} else if (is_khtml) {
importStylesheetURI(stylepath+'/'+skin+'/KHTMLFixes.css');
+ } else if (is_ff2_) {
+ importStylesheetURI(stylepath+'/'+skin+'/FF2Fixes.css');
}
}
// Uses DOM calls to avoid document.write + XHTML issues
var linkHolder = document.getElementById('toctitle');
- if (!linkHolder) {
+ var existingLink = document.getElementById('togglelink');
+ if (!linkHolder || existingLink) {
+ // Don't add the toggle link twice
return;
}
}
for (var i = start; i <= finish; ++i ) {
checkboxes[i].checked = endState;
+ if( i > start && typeof checkboxes[i].onchange == 'function' )
+ checkboxes[i].onchange(); // fire triggers
}
lastCheckbox = this.index;
return true;
span.setAttribute('sortdir','down');
}
- for(var i in staticRows) {
+ for (var i = 0; i < staticRows.length; i++) {
var row = staticRows[i];
newRows.splice(row[2], 0, row);
}
}
num = parseFloat(s.replace(/,/g, ""));
- return (isNaN(num) ? s : num);
+ return (isNaN(num) ? 0 : num);
}
function ts_currencyToSortKey( s ) {