summaryrefslogtreecommitdiffstats
path: root/ui/src
diff options
context:
space:
mode:
Diffstat (limited to 'ui/src')
-rw-r--r--ui/src/components/comment-form.tsx6
-rw-r--r--ui/src/index.html1
2 files changed, 4 insertions, 3 deletions
diff --git a/ui/src/components/comment-form.tsx b/ui/src/components/comment-form.tsx
index b26fe0c9..57518a13 100644
--- a/ui/src/components/comment-form.tsx
+++ b/ui/src/components/comment-form.tsx
@@ -6,7 +6,7 @@ import { WebSocketService, UserService } from '../services';
import * as autosize from 'autosize';
import { i18n } from '../i18next';
import { T } from 'inferno-i18next';
-import * as tributejs from 'tributejs';
+declare var Tribute: any;
interface CommentFormProps {
postId?: number;
@@ -23,7 +23,7 @@ interface CommentFormState {
export class CommentForm extends Component<CommentFormProps, CommentFormState> {
- private id = `comment-form-${btoa(Math.random()).substring(0,12)}`;
+ private id = `comment-form-${Math.random().toString(36).replace(/[^a-z]+/g, '').substr(2, 10)}`;
private userSub: Subscription;
private communitySub: Subscription;
private tribute: any;
@@ -40,7 +40,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
constructor(props: any, context: any) {
super(props, context);
- this.tribute = new tributejs({
+ this.tribute = new Tribute({
collection: [
// Users
diff --git a/ui/src/index.html b/ui/src/index.html
index 4dbde8b0..f2e513f1 100644
--- a/ui/src/index.html
+++ b/ui/src/index.html
@@ -9,6 +9,7 @@
<link rel="shortcut icon" type="image/svg+xml" href="/static/assets/favicon.svg" />
<link rel="apple-touch-icon" href="/static/assets/apple-touch-icon.png" />
<script async src="/static/assets/libs/sortable/sortable.min.js"></script>
+ <script async src="/static/assets/libs/tribute.min.js"></script>
<script src="/static/assets/libs/markdown-it-emoji/markdown-it-emoji.min.js" type="text/javascript"></script>
</head>