var PurpleMine = PurpleMine || {} // eslint-disable-line no-use-before-define PurpleMine.HistoryTabs = (function () { 'use strict' var instance var translations = { en: { all: 'All', notes: 'Notes', details: 'Changes' }, ro: { all: 'Toate', notes: 'Note', details: 'Schimbări' }, fr: { all: 'Tout', notes: 'Remarques', details: 'Changements' }, pl: { all: 'Wszystko', notes: 'Notatki', details: 'Zmiany' }, de: { all: 'Alles', notes: 'Kommentare', details: 'Änderungen' }, ja: { all: 'すべて', notes: '注記', details: '変更' } } function HistoryTabs () { if (instance) { return instance } instance = this this.$tabsContainer = null this.$tabs = null this.$history = $('#history') this.lang = document.documentElement.lang if (typeof translations[this.lang] === 'undefined') { this.lang = 'en' } this._ = translations[this.lang] if (this.$history.length > 0 && $('#history > h3').length > 0) { buildTabs() markFirstOfTypes() } } function buildTabs () { var html = '' var liStart = '