--- +++ @@ -95,10 +95,36 @@ for (var b in BDict) BDict[b][0] = Isrc + BDict[b][0]; // Add the start of the URL (Isrc) to the buttons -var normal = mw.toolbar.buttons.splice(0); // Leeren +var normal; $(document).ready(function(){ var t = mw.toolbar; + normal = mw.toolbar.buttons.splice(0); // Leeren + //============================================================ + // Table generator + //============================================================ + /** en: Generate an array using Mediawiki syntax + * @author: originally from fr:user:dake + * @version: 0.2 */ + mw.toolbar.generateTable = function(caption, exhead, nbCol, nbRow, exfield, align){ + var code = "\n"; + code += '{| class="wikitable" ' + align + '\n' + + caption + exhead; + if (exfield) code += '!\n'; + for (i=1;i