User:Polygnotus/Scripts/FavouriteTemplates.js: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 139:
if (favoriteTemplates && favoriteTemplates.length > 0) {
// First, add the section
$textarea.wikiEditor( 'addToToolbar', {
sections: {
'favorite-templates': {
labeltype: 'Favorite Templatestoolbar',
label: 'Favorite Templates'
}
}
} );
// Create the tools object for the buttons
const templateTools = {};
Line 159 ⟶ 169:
}
// AddThen add the Templates sectiongroup with all tools at once
$textarea.wikiEditor( 'addToToolbar', {
section: 'mainfavorite-templates',
groups: {
'favorite-templatesfavorites': {
label: 'Favorite Templates',
tools: templateTools
}