МедияУики:Common.js/Core.js: Разлика между версии
Изтрито е съдържание Добавено е съдържание
хайде и sortlines |
м първо Gecko |
||
Ред 5:
function applyFuncToTextarea(tid, func) {
var ta = document.getElementById(tid);
if (document.selection && document.selection.createRange().text != "") {▼
document.selection.createRange().text = func.call(▼
null, document.selection.createRange().text);▼
▲ } else if ( typeof(ta.selectionStart) != "undefined"
&& ta.selectionStart != ta.selectionEnd ) {
ta.value = String.concat(
Line 14 ⟶ 11:
func.call(null, ta.value.substring(ta.selectionStart, ta.selectionEnd)),
ta.value.substring(ta.selectionEnd, ta.value.length) );
▲ } else if (document.selection && document.selection.createRange().text != "") {
▲ document.selection.createRange().text = func.call(
▲ null, document.selection.createRange().text);
} else {
ta.value = func.call(null, ta.value);
|