Revision 4064294 of "User:Ineuw/vector.js" on enwikisource

//User annotation
mw.toolbar.addButton(
      "",
      " Ua ",
      '<ref>{{Ua|note=',
      '}}</ref>',
      ""
);

// &emdash;
mw.toolbar.addButton(
      "http://upload.wikimedia.org/wikipedia/commons/a/a2/Emdash-button-bg.png",
      " — ",
      '—',
      '',
      ""
);

// Category
mw.toolbar.addButton(
      "",
      " [[Cat ",
      '[[Category:',
      '|{{SUBPAGENAME}}]]\n',
      ""
);

//section begin=E
mw.toolbar.addButton(
      "",
      " sbE ",
      '<section begin=E',
      ' />',
      ""
);

//section end=E section begin=B
mw.toolbar.addButton(
      "",
      " seEsbB ",
      '{{PSM rule}}\n<section end=E',
      ' /><section begin=B />\n\n',
      ""
);

//section end=B
mw.toolbar.addButton(
      "",
      " seB ",
      '<section end=B',
      ' />',
      ""
);

//Under construction
mw.toolbar.addButton(
      "",
      " Und ",
      '{{Under construction}}',
      '',
      ""
);

//PSMTable
mw.toolbar.addButton(
      "",
      " Tbl ",
      '{{PSMTable}}',
      '',
      ""
);

//PSMImages
mw.toolbar.addButton(
      "",
      " Img ",
      '{{PSMImages}}',
      '',
      ""
);

addOnloadHook(function(){
    qualityContainer = document.getElementById('wpQuality-container');
    if (qualityContainer == null) return;
 
    quality0 = qualityContainer.getElementsByClassName('quality0')
    withouttext = quality0[0].childNodes[0];
 
    withouttext.addEventListener('click', function () {
        document.getElementsByName('wpTextbox1')[0].value = "";
        document.getElementsByName('wpHeaderTextbox')[0].value = "";
        document.getElementsByName('wpFooterTextbox')[0].value = "";
        document.getElementsByName('wpSave')[0].click();
    });
});