MediaWiki:Gadget-editSummary.js: различия между версиями
>Rappy 4187 мНет описания правки |
м CSS>>DHTML. Другой очевидной возможности нет |
||
| Строка 4: | Строка 4: | ||
if (!sum || (sum.form.wpSection && sum.form.wpSection.value == 'new')) return; | if (!sum || (sum.form.wpSection && sum.form.wpSection.value == 'new')) return; | ||
var sp = document.createElement('span'); sp.id = 'userSummaryButtonsA'; | var sp = document.createElement('span'); sp.id = 'userSummaryButtonsA'; | ||
sp.style = "margin-top:-1000px"; | |||
sum.parentNode.insertBefore(sp, sum.nextSibling); | sum.parentNode.insertBefore(sp, sum.nextSibling); | ||
sum.parentNode.insertBefore(document.createElement('br'), sum.nextSibling); | sum.parentNode.insertBefore(document.createElement('br'), sum.nextSibling); | ||
| Строка 27: | Строка 28: | ||
btn.appendChild(document.createTextNode(name)); | btn.appendChild(document.createTextNode(name)); | ||
btn.title = title; | btn.title = title; | ||
btn.style = "float:left"; | |||
btn.onclick = function(){insertSummary(text)}; | btn.onclick = function(){insertSummary(text)}; | ||
document.getElementById('userSummaryButtonsA').appendChild(btn); | document.getElementById('userSummaryButtonsA').appendChild(btn); | ||