Content deleted Content added
mNo edit summary |
maintenance: more info ReferenceError: Can't find variable: addLink |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1:
//'winc' function allows buttons to be added toolbar
if(typeof winc !== 'undefined') {
winc('User:Omegatron/monobook.js/addlink.js');
}
function units_nbsp() {
Line 101 ⟶ 102:
txt.value = txt.value.replace(/([\(\|]\d{1,4})\s?['’]\s?(\d{1,2})\s?["”][^NESW]/g, '$1 ft $2 in');
txt.value = txt.value.replace(/(\d)\s?ft\s(\d)\s?in/gi, '$1 ft $2 in');
txt.value = txt.value.replace(/(\d)\s?feet/gi, '$1 feet');
txt.value = txt.value.replace(/(\d)\s?foot/gi, '$1 foot');
txt.value = txt.value.replace(/(\d)\s?knots/gi, '$1 knots');
txt.value = txt.value.replace(/(\d)\s?nmi/gi, '$1 nmi');
txt.value = txt.value.replace(/(\d)\s?nm/gi, '$1 nm');
//Symbols for square feet
Line 167 ⟶ 175:
}
if(document.forms.editform) {
if(typeof addLink === 'undefined') return;
addLink('p-cactions', 'javascript:units_nbsp()', 'units_nbsp', 'ca-unitfixer', 'Fixes some unit formatting', '', '');
}
|