אונטערשייד צווישן ווערסיעס פון "מעדיעוויקי:Ref2template.js"

קיין רעדאגירונג באמערקונג
אין תקציר עריכה
אין תקציר עריכה
שורה 1: שורה 1:
if ($.inArray(mw.config.get('wgAction'), ['edit', 'submit']) + 1) {
if ($.inArray(mw.config.get('wgAction'), ['edit', 'submit']) + 1) {
     console.log("Current action:", mw.config.get('wgAction'));
     console.log("Current action:", mw.config.get('wgAction'));
    console.log($('#wpTextbox1').length);
     $('#wpTextbox1').on('wikiEditor-dialogs-loaded-insert-reference', function () {
     $('#wpTextbox1').on('wikiEditor-dialogs-loaded-insert-reference', function () {
         console.log("WikiEditor dialog loaded");
         console.log("WikiEditor dialog loaded");
שורה 58: שורה 57:
         });
         });
     });
     });
     $(function () {
     $(function () {
         var action = $('[rel=reference]').data('action'),
         mw.hook('wikiEditor.toolbarReady').add(function ($textarea) {
            var action = $('[rel=reference]').data('action'),
                options = (action || {}).options;
            console.log("Reference action:", action);
            console.log("Reference options:", options);
            if (options) {
                options.pre = '{{הערה|1=';
                options.post = '}}';
            }
            action = $('[rel=newline]').data('action');
            console.log("Newline action:", action);
             options = (action || {}).options;
             options = (action || {}).options;
        console.log("Reference action:", action);
             console.log("Newline options:", options);
        console.log("Reference options:", options);
            if (options)
        if (options) {
                options.pre = '{{ש}}\n';
            options.pre = '{{הערה|1=';
            else
             options.post = '}}';
                $('#wpTextbox1').on('wikiEditor-toolbar-buildSection-advanced', function (e, d) {
        }
                    d.groups.format.tools.newline.action.options.pre = '{{ש}}\n';
        action = $('[rel=newline]').data('action');
                });
        console.log("Newline action:", action);
        });
        options = (action || {}).options;
        console.log("Newline options:", options);
        if (options)
            options.pre = '{{ש}}\n';
        else
            $('#wpTextbox1').on('wikiEditor-toolbar-buildSection-advanced', function (e, d) {
                d.groups.format.tools.newline.action.options.pre = '{{ש}}\n';
            });
     })
     })
}
}