User:Bobblewik/monobook.js/unitformatter.js: Difference between revisions

Content deleted Content added
Bobblewik (talk | contribs)
mNo edit summary
Bobblewik (talk | contribs)
mNo edit summary
Line 128:
 
// bps or b/s or bits/s --> bit/s
txt.value = txt.value.replace(/([kmgKkMmGg])(bps|bits?\/s|b\/s)/gig, '$1bit/s');
txt.value = txt.value.replace(/(\d)\s?(bps)/gi, '$1 bit/s');
 
// Bps or byte/s or bytes/s --> B/s
txt.value = txt.value.replace(/([KkMmGgTtPpEeYyZzKkMmGg])(Bps|bytes?\/s)/g, ' $1B/s');
 
// Make capitalization correct