mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 22:14:25 +01:00
@@ -425,13 +425,17 @@ $(() => {
|
||||
$("#flags-create-select").change(flagTypeSelect);
|
||||
$(".edit-flag").click(editFlagModal);
|
||||
|
||||
// Insert CommentBox element
|
||||
const commentBox = Vue.extend(CommentBox);
|
||||
let vueContainer = document.createElement("div");
|
||||
document.querySelector("#comment-box").appendChild(vueContainer);
|
||||
new commentBox({
|
||||
propsData: { type: "challenge", id: window.CHALLENGE_ID }
|
||||
}).$mount(vueContainer);
|
||||
// Because this JS is shared by a few pages,
|
||||
// we should only insert the CommentBox if it's actually in use
|
||||
if (document.querySelector("#comment-box")) {
|
||||
// Insert CommentBox element
|
||||
const commentBox = Vue.extend(CommentBox);
|
||||
let vueContainer = document.createElement("div");
|
||||
document.querySelector("#comment-box").appendChild(vueContainer);
|
||||
new commentBox({
|
||||
propsData: { type: "challenge", id: window.CHALLENGE_ID }
|
||||
}).$mount(vueContainer);
|
||||
}
|
||||
|
||||
$.get(CTFd.config.urlRoot + "/api/v1/challenges/types", function(response) {
|
||||
const data = response.data;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user