MediaWiki:Gadget-editSummary.js: различия между версиями

м O_o
м >_< Weird on MonoBook
Строка 3: Строка 3:
  var sum = document.getElementById('wpSummary');
  var sum = document.getElementById('wpSummary');
  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('div'); sp.id = 'userSummaryButtonsA';
  var sp = document.createElement('span'); sp.id = 'userSummaryButtonsA';
sp.style = "margin:-13px 0 -6px -10px;";
  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);
Строка 24: Строка 23:
  addSumButton('картинка', 'картинка', 'Добавлены картинки');
  addSumButton('картинка', 'картинка', 'Добавлены картинки');
   
   
// HIDER
  $(sp).css({display:'inline'}).children("a").css({display:'inline'});
sp.insertAdjacentHTML('afterbegin', '<b>[+]</b>');
  $(sp)
    .on("mouseover", function() {
        $(this).children("a").css({display:'inline-block'});
    }).on("mouseout", function() {
        $(this).children("a").hide();
}).children("a").hide();
   
   
}
}