Utilizzo questo codice (nella scheda /head della pagina di personalizzazione CSS/HTML) per aggiungere alcuni elementi aggiuntivi al menu, ma ha smesso di funzionare dopo un recente aggiornamento. Qualcuno sa perché?
<script>
Discourse.ExternalNavItem = Discourse.NavItem.extend({
href : function() {
return this.get('href');
}.property('href')
});
I18n.translations.en.js.filters.first_name_here = { title: "Nome", help: "Nome di nuovo" };
I18n.translations.en.js.filters.second_name_here = { title: "Nome", help: "Visita il nostro...." };
I18n.translations.en.js.filters.tags = { title: "Tag", help: "Tag" };
Discourse.NavItem.reopenClass({
buildList : function(category, args) {
var list = this._super(category, args);
if(!category) {
list.push(Discourse.ExternalNavItem.create({href: 'http://forum.com/tags', name: 'tags'}));
list.push(Discourse.ExternalNavItem.create({href: 'https://forum.com/something', name: 'name'}));
list.push(Discourse.ExternalNavItem.create({href: 'https://forum.com/t/thread-url/193454#heading--name', name: 'name'}));
}
return list;
}
});
</script>