Content deleted Content added
No edit summary |
No edit summary |
||
Line 63:
var oldButton = $('#' + button.id);
oldButton.attr('id', button.id + '_ButtonToBeRemoved')
.replaceWith(
return;
}
// add button to the new, WikiEditor, toolbar
Line 73 ⟶ 82:
action: {
type: (button.inserts ? 'encapsulate' : 'callback'),
execute: (button.inserts ? void(0) : button.callback),
options: (button.inserts ? {
pre: button.before,
Line 81 ⟶ 90:
}
};
$('#wpTextbox1').wikiEditor('addToToolbar', {
'section': button.section,
Line 102 ⟶ 110:
if ($('#' + button.id).size() == 0) {
// add a button to the classic toolbar
▲ if (!button.inserts && oldButton[0]) {
oldButton.
}▼
▲ mw.loader.using('mediawiki.action.edit', function () {
button.before, button.after, button.between,
▲ mw.toolbar.addButton(
▲ (button.iconUrlClassic || button.iconUrl),
▲ }
▲ tempButtonId
▲ );
▲ if (button.inserts) {
▲ }
▲ // clone the button to remove added event handlers
▲ newB.id = button.id;
▲ $(newB).click(button.callback);
▲ });
}
}
|