summaryrefslogtreecommitdiffstats
path: root/templates/base/footer.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/base/footer.tmpl')
-rw-r--r--templates/base/footer.tmpl18
1 files changed, 14 insertions, 4 deletions
diff --git a/templates/base/footer.tmpl b/templates/base/footer.tmpl
index 6868b918b6..2481b2187c 100644
--- a/templates/base/footer.tmpl
+++ b/templates/base/footer.tmpl
@@ -68,8 +68,11 @@
}
return itemStr;
}
- })
- issuesTribute.attach(document.getElementById('content'))
+ });
+ var content = document.getElementById('content');
+ if (content != null) {
+ issuesTribute.attach(content);
+ }
</script>
<script>
var emojiTribute = new Tribute({
@@ -93,7 +96,7 @@
return item;
},
selectTemplate: function (item) {
- if (typeof item === 'undefinied') return null;
+ if (typeof item === 'undefined') return null;
return ':' + item.original + ':';
},
menuItemTemplate: function (item) {
@@ -101,7 +104,14 @@
}
}]
});
- emojiTribute.attach(document.getElementById('content'))
+ var emojiInputs = document.querySelectorAll('.emoji-input');
+ if (emojiInputs.length > 0) {
+ emojiTribute.attach(emojiInputs);
+ }
+ var content = document.getElementById('content');
+ if (content != null) {
+ emojiTribute.attach(document.getElementById('content'));
+ }
</script>
{{end}}
<script src="{{AppSubUrl}}/vendor/plugins/emojify/emojify.min.js"></script>