script updated
<script type="text/discourse-plugin" version="0.11.2">
const NavItem = require("discourse/models/nav-item").default;
const ExternalNavItem = NavItem.extend({
href : function() {
return this.get('href');
}.property('href')
});
I18n.translations.en.js.filters.ocasasite = { title: "OCASA", help: "Go to OCASA site" };
NavItem.reopenClass({
buildList : function(category, args) {
var list = this._super(category, args);
if(!category) {
list.push(ExternalNavItem.create({href: 'http://www.example.org/', name: 'ocasasite'}));
}
return list;
}
});
</script>