Колдонуучу:AlefZet/monobook.js: нускалардын айырмасы

Жок кылынган мазмун Кошулган мазмун
No edit summary
No edit summary
 
1-сап:
/* <pre><nowiki> */
function choiceSymbol() {
addSpecialButton('ʻ&nbsp;', 'insertSymbol("ʻ")', 'sButtonsStyle',
'Turned Comma');
addSpecialButton('ʼ&nbsp;', 'insertSymbol("ʼ")', 'sButtonsStyle',
'Apostrophe');
}
 
var searchForm, newSpan, newCaption, newOnClick, newClass;
function addSpecialButton(pCaption, pAction, pClass, pTitle) {
searchForm = document.getElementById('searchform');
if (searchForm) {
newSpan = document.createElement('span');
 
newCaption = document.createTextNode(pCaption);
newSpan.appendChild(newCaption);
 
newOnClick = document.createAttribute('onclick');
newOnClick.nodeValue = pAction;
newSpan.setAttributeNode(newOnClick);
 
newSpan.title = pTitle;
 
newClass = document.createAttribute('class');
newClass.nodeValue = pClass;
newSpan.setAttributeNode(newClass);
 
searchForm.appendChild(document.createTextNode(' '));
searchForm.appendChild(newSpan);
}
}
 
var searchString;
function insertSymbol(s) {
if (navigator.appName == 'Microsoft Internet Explorer' ) {
searchString = document.getElementByName('search');
} else {
searchString = document.getElementById('searchInput');
}
searchString.value = searchString.value + s;
searchString.focus();
}
 
hookEvent("load", choiceSymbol);
/* </nowiki></pre> */