/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "/"; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 2); /******/ }) /************************************************************************/ /******/ ({ /***/ "./node_modules/babel-loader/lib/index.js?{\"cacheDirectory\":true,\"presets\":[[\"env\",{\"modules\":false,\"targets\":{\"browsers\":[\"> 2%\"],\"uglify\":true}}]],\"plugins\":[\"transform-object-rest-spread\",[\"transform-runtime\",{\"polyfill\":false,\"helpers\":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/components/DiscoverComponent.vue": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ __webpack_exports__["a"] = ({ data: function data() { return { people: {}, posts: {}, trending: {} }; }, mounted: function mounted() { this.fetchData(); }, methods: { followUser: function followUser(id, event) { axios.post('/i/follow', { item: id }).then(function (res) { var el = $(event.target); el.addClass('btn-outline-secondary').removeClass('btn-primary'); el.text('Unfollow'); }).catch(function (err) { swal('Whoops! Something went wrong...', 'An error occurred, please try again later.', 'error'); }); }, fetchData: function fetchData() { var _this = this; // axios.get('/api/v2/discover/people') // .then((res) => { // let data = res.data; // this.people = data.people; // if(this.people.length > 1) { // $('.section-people .loader').hide(); // $('.section-people .row.d-none').removeClass('d-none'); // } // }); axios.get('/api/v2/discover/posts').then(function (res) { var data = res.data; _this.posts = data.posts; if (_this.posts.length > 1) { $('.section-explore .loader').hide(); $('.section-explore .row.d-none').removeClass('d-none'); } }); } } }); /***/ }), /***/ "./node_modules/babel-loader/lib/index.js?{\"cacheDirectory\":true,\"presets\":[[\"env\",{\"modules\":false,\"targets\":{\"browsers\":[\"> 2%\"],\"uglify\":true}}]],\"plugins\":[\"transform-object-rest-spread\",[\"transform-runtime\",{\"polyfill\":false,\"helpers\":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/components/FollowSuggestions.vue": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ __webpack_exports__["a"] = ({ data: function data() { return { results: {} }; }, mounted: function mounted() { this.fetchData(); }, methods: { fetchData: function fetchData() { var _this = this; axios.get('/api/local/i/follow-suggestions').then(function (response) { _this.results = response.data; }); } } }); /***/ }), /***/ "./node_modules/babel-loader/lib/index.js?{\"cacheDirectory\":true,\"presets\":[[\"env\",{\"modules\":false,\"targets\":{\"browsers\":[\"> 2%\"],\"uglify\":true}}]],\"plugins\":[\"transform-object-rest-spread\",[\"transform-runtime\",{\"polyfill\":false,\"helpers\":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/components/PostComments.vue": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ __webpack_exports__["a"] = ({ props: ['post-id', 'post-username', 'user'], data: function data() { return { results: null, pagination: {}, min_id: 0, max_id: 0, reply_to_profile_id: 0 }; }, mounted: function mounted() { this.fetchData(); }, updated: function updated() { pixelfed.readmore(); }, methods: { embed: function embed(e) { //pixelfed.embed.build(e); }, deleteComment: function deleteComment(id, i) { var _this = this; axios.post('/i/delete', { type: 'comment', item: id }).then(function (res) { _this.results.splice(i, 1); }).catch(function (err) { swal('Something went wrong!', 'Please try again later', 'error'); }); }, l: function l(e) { var len = e.length; if (len < 10) { return e; } return e.substr(0, 10) + '...'; }, reply: function reply(e) { this.reply_to_profile_id = e.account.id; $('.comment-form input[name=comment]').val('@' + e.account.username + ' '); $('.comment-form input[name=comment]').focus(); }, fetchData: function fetchData() { var _this2 = this; var url = '/api/v2/comments/' + this.postUsername + '/status/' + this.postId; axios.get(url).then(function (response) { var self = _this2; _this2.results = _.reverse(response.data.data); _this2.pagination = response.data.meta.pagination; if (_this2.results.length > 0) { $('.load-more-link').removeClass('d-none'); } $('.postCommentsLoader').addClass('d-none'); $('.postCommentsContainer').removeClass('d-none'); }).catch(function (error) { if (!error.response) { $('.postCommentsLoader .lds-ring').attr('style', 'width:100%').addClass('pt-4 font-weight-bold text-muted').text('An error occurred, cannot fetch comments. Please try again later.'); } else { switch (error.response.status) { case 401: $('.postCommentsLoader .lds-ring').attr('style', 'width:100%').addClass('pt-4 font-weight-bold text-muted').text('Please login to view.'); break; default: $('.postCommentsLoader .lds-ring').attr('style', 'width:100%').addClass('pt-4 font-weight-bold text-muted').text('An error occurred, cannot fetch comments. Please try again later.'); break; } } }); }, loadMore: function loadMore(e) { var _this3 = this; e.preventDefault(); if (this.pagination.total_pages == 1 || this.pagination.current_page == this.pagination.total_pages) { $('.load-more-link').addClass('d-none'); return; } $('.postCommentsLoader').removeClass('d-none'); var next = this.pagination.links.next; axios.get(next).then(function (response) { var self = _this3; var res = response.data.data; $('.postCommentsLoader').addClass('d-none'); for (var i = 0; i < res.length; i++) { _this3.results.unshift(res[i]); } _this3.pagination = response.data.meta.pagination; }); } } }); /***/ }), /***/ "./node_modules/babel-loader/lib/index.js?{\"cacheDirectory\":true,\"presets\":[[\"env\",{\"modules\":false,\"targets\":{\"browsers\":[\"> 2%\"],\"uglify\":true}}]],\"plugins\":[\"transform-object-rest-spread\",[\"transform-runtime\",{\"polyfill\":false,\"helpers\":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/components/PostComponent.vue": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // pixelfed.postComponent = {}; /* harmony default export */ __webpack_exports__["a"] = ({ props: ['status-id', 'status-username', 'status-template', 'status-url', 'status-profile-url', 'status-avatar'], data: function data() { return { status: {}, media: {}, user: {}, reactions: { liked: false, shared: false }, likes: {}, likesPage: 1, shares: {}, sharesPage: 1 }; }, mounted: function mounted() { this.fetchData(); this.authCheck(); var token = $('meta[name="csrf-token"]').attr('content'); $('input[name="_token"]').each(function (k, v) { var el = $(v); el.val(token); }); }, updated: function updated() { $('.carousel').carousel(); if (this.reactions) { if (this.reactions.bookmarked == true) { $('.far.fa-bookmark').removeClass('far').addClass('fas text-warning'); } if (this.reactions.shared == true) { $('.far.fa-share-square').addClass('text-primary'); } if (this.reactions.liked == true) { $('.far.fa-heart ').removeClass('far text-dark').addClass('fas text-danger'); } } if (this.status) { var title = this.status.account.username + ' posted a photo: ' + this.status.favourites_count + ' likes'; $('head title').text(title); } }, methods: { authCheck: function authCheck() { var authed = $('body').hasClass('loggedIn'); if (authed == true) { $('.comment-form-guest').addClass('d-none'); $('.comment-form').removeClass('d-none'); } }, showMuteBlock: function showMuteBlock() { var sid = this.status.account.id; var uid = this.user.id; if (sid == uid) { $('.post-actions .menu-author').removeClass('d-none'); } else { $('.post-actions .menu-user').removeClass('d-none'); } }, reportUrl: function reportUrl() { return '/i/report?type=post&id=' + this.status.id; }, editUrl: function editUrl() { return this.status.url + '/edit'; }, timestampFormat: function timestampFormat() { var ts = new Date(this.status.created_at); return ts.toDateString() + ' ' + ts.toLocaleTimeString(); }, fetchData: function fetchData() { var _this = this; var loader = this.$loading.show({ 'opacity': 0, 'background-color': '#f5f8fa' }); axios.get('/api/v2/profile/' + this.statusUsername + '/status/' + this.statusId).then(function (response) { var self = _this; self.status = response.data.status; self.user = response.data.user; self.media = self.status.media_attachments; self.reactions = response.data.reactions; self.likes = response.data.likes; self.shares = response.data.shares; self.likesPage = 2; self.sharesPage = 2; //this.buildPresenter(); _this.showMuteBlock(); loader.hide(); pixelfed.readmore(); $('.postComponent').removeClass('d-none'); $('.postPresenterLoader').addClass('d-none'); $('.postPresenterContainer').removeClass('d-none'); }).catch(function (error) { if (!error.response) { $('.postPresenterLoader .lds-ring').attr('style', 'width:100%').addClass('pt-4 font-weight-bold text-muted').text('An error occurred, cannot fetch media. Please try again later.'); } else { switch (error.response.status) { case 401: $('.postPresenterLoader .lds-ring').attr('style', 'width:100%').addClass('pt-4 font-weight-bold text-muted').text('Please login to view.'); break; default: $('.postPresenterLoader .lds-ring').attr('style', 'width:100%').addClass('pt-4 font-weight-bold text-muted').text('An error occurred, cannot fetch media. Please try again later.'); break; } } }); }, commentFocus: function commentFocus() { $('.comment-form input[name="comment"]').focus(); }, likesModal: function likesModal() { if (this.status.favourites_count == 0 || $('body').hasClass('loggedIn') == false) { return; } this.$refs.likesModal.show(); }, sharesModal: function sharesModal() { if (this.status.reblogs_count == 0 || $('body').hasClass('loggedIn') == false) { return; } this.$refs.sharesModal.show(); }, infiniteLikesHandler: function infiniteLikesHandler($state) { var _this2 = this; var api = '/api/v2/likes/profile/' + this.statusUsername + '/status/' + this.statusId; axios.get(api, { params: { page: this.likesPage } }).then(function (_ref) { var data = _ref.data; if (data.data.length) { var _likes; _this2.likesPage += 1; (_likes = _this2.likes).push.apply(_likes, _toConsumableArray(data.data)); $state.loaded(); } else { $state.complete(); } }); }, infiniteSharesHandler: function infiniteSharesHandler($state) { var _this3 = this; axios.get('/api/v2/shares/profile/' + this.statusUsername + '/status/' + this.statusId, { params: { page: this.sharesPage } }).then(function (_ref2) { var data = _ref2.data; if (data.data.length) { var _shares; _this3.sharesPage += 1; (_shares = _this3.shares).push.apply(_shares, _toConsumableArray(data.data)); $state.loaded(); } else { $state.complete(); } }); }, likeStatus: function likeStatus(event) { var _this4 = this; if ($('body').hasClass('loggedIn') == false) { return; } axios.post('/i/like', { item: this.status.id }).then(function (res) { _this4.status.favourites_count = res.data.count; if (_this4.reactions.liked == true) { _this4.reactions.liked = false; } else { _this4.reactions.liked = true; } }).catch(function (err) { swal('Error', 'Something went wrong, please try again later.', 'error'); }); }, shareStatus: function shareStatus() { var _this5 = this; if ($('body').hasClass('loggedIn') == false) { return; } axios.post('/i/share', { item: this.status.id }).then(function (res) { _this5.status.reblogs_count = res.data.count; if (_this5.reactions.shared == true) { _this5.reactions.shared = false; } else { _this5.reactions.shared = true; } }).catch(function (err) { swal('Error', 'Something went wrong, please try again later.', 'error'); }); }, bookmarkStatus: function bookmarkStatus() { var _this6 = this; if ($('body').hasClass('loggedIn') == false) { return; } axios.post('/i/bookmark', { item: this.status.id }).then(function (res) { if (_this6.reactions.bookmarked == true) { _this6.reactions.bookmarked = false; } else { _this6.reactions.bookmarked = true; } }).catch(function (err) { swal('Error', 'Something went wrong, please try again later.', 'error'); }); }, muteProfile: function muteProfile() { var _this7 = this; if ($('body').hasClass('loggedIn') == false) { return; } axios.post('/i/mute', { type: 'user', item: this.status.account.id }).then(function (res) { swal('Success', 'You have successfully muted ' + _this7.status.account.acct, 'success'); }).catch(function (err) { swal('Error', 'Something went wrong. Please try again later.', 'error'); }); }, blockProfile: function blockProfile() { var _this8 = this; if ($('body').hasClass('loggedIn') == false) { return; } axios.post('/i/block', { type: 'user', item: this.status.account.id }).then(function (res) { swal('Success', 'You have successfully blocked ' + _this8.status.account.acct, 'success'); }).catch(function (err) { swal('Error', 'Something went wrong. Please try again later.', 'error'); }); }, deletePost: function deletePost() { var result = confirm('Are you sure you want to delete this post?'); if (result) { if ($('body').hasClass('loggedIn') == false) { return; } axios.post('/i/delete', { type: 'status', item: this.status.id }).then(function (res) { swal('Success', 'You have successfully deleted this post', 'success'); }).catch(function (err) { swal('Error', 'Something went wrong. Please try again later.', 'error'); }); } } } }); /***/ }), /***/ "./node_modules/babel-loader/lib/index.js?{\"cacheDirectory\":true,\"presets\":[[\"env\",{\"modules\":false,\"targets\":{\"browsers\":[\"> 2%\"],\"uglify\":true}}]],\"plugins\":[\"transform-object-rest-spread\",[\"transform-runtime\",{\"polyfill\":false,\"helpers\":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/components/Timeline.vue": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ __webpack_exports__["a"] = ({ data: function data() { return { page: 2, feed: [], profile: {}, scope: window.location.pathname, min_id: 0, max_id: 0, notifications: {}, stories: {}, suggestions: {}, loading: true }; }, beforeMount: function beforeMount() { this.fetchTimelineApi(); this.fetchProfile(); }, mounted: function mounted() {}, updated: function updated() {}, methods: { fetchProfile: function fetchProfile() { var _this = this; axios.get('/api/v1/accounts/verify_credentials').then(function (res) { _this.profile = res.data; $('.profile-card .loader').addClass('d-none'); $('.profile-card .contents').removeClass('d-none'); $('.profile-card .card-footer').removeClass('d-none'); _this.fetchNotifications(); }).catch(function (err) { swal('Oops, something went wrong', 'Please reload the page.', 'error'); }); }, fetchTimelineApi: function fetchTimelineApi() { var _this2 = this; var homeTimeline = '/api/v1/timelines/home?page=1'; var localTimeline = '/api/v1/timelines/public?page=1'; var apiUrl = this.scope == '/' ? homeTimeline : localTimeline; axios.get(apiUrl).then(function (res) { var _feed; $('.timeline .loader').addClass('d-none'); var data = res.data; (_feed = _this2.feed).push.apply(_feed, _toConsumableArray(data)); var ids = data.map(function (status) { return status.id; }); _this2.min_id = Math.min.apply(Math, _toConsumableArray(ids)); if (_this2.page == 1) { _this2.max_id = Math.max.apply(Math, _toConsumableArray(ids)); } _this2.loading = false; }).catch(function (err) {}); }, infiniteTimeline: function infiniteTimeline($state) { var _this3 = this; var homeTimeline = '/api/v1/timelines/home'; var localTimeline = '/api/v1/timelines/public'; var apiUrl = this.scope == '/' ? homeTimeline : localTimeline; axios.get(apiUrl, { params: { page: this.page } }).then(function (res) { if (res.data.length && _this3.loading == false) { var _feed2; var data = res.data; (_feed2 = _this3.feed).push.apply(_feed2, _toConsumableArray(data)); var ids = data.map(function (status) { return status.id; }); _this3.min_id = Math.min.apply(Math, _toConsumableArray(ids)); if (_this3.page == 1) { _this3.max_id = Math.max.apply(Math, _toConsumableArray(ids)); } _this3.page += 1; $state.loaded(); _this3.loading = false; } else { $state.complete(); } }); }, fetchNotifications: function fetchNotifications() { var _this4 = this; axios.get('/api/v1/notifications').then(function (res) { _this4.notifications = res.data; $('.notification-card .loader').addClass('d-none'); $('.notification-card .contents').removeClass('d-none'); }); }, reportUrl: function reportUrl(status) { var type = status.in_reply_to ? 'comment' : 'post'; var id = status.id; return '/i/report?type=' + type + '&id=' + id; }, commentFocus: function commentFocus(status, $event) { var el = event.target; var card = el.parentElement.parentElement.parentElement; var comments = card.getElementsByClassName('comments')[0]; if (comments.children.length == 0) { comments.classList.add('mb-2'); this.fetchStatusComments(status, card); } var footer = card.querySelectorAll('.card-footer')[0]; var input = card.querySelectorAll('.status-reply-input')[0]; if (footer.classList.contains('d-none') == true) { footer.classList.remove('d-none'); input.focus(); } else { footer.classList.add('d-none'); input.blur(); } }, likeStatus: function likeStatus(status, $event) { if ($('body').hasClass('loggedIn') == false) { return; } axios.post('/i/like', { item: status.id }).then(function (res) { status.favourites_count = res.data.count; if (status.favourited == true) { status.favourited = false; } else { status.favourited = true; } }).catch(function (err) { swal('Error', 'Something went wrong, please try again later.', 'error'); }); }, shareStatus: function shareStatus(status, $event) { if ($('body').hasClass('loggedIn') == false) { return; } axios.post('/i/share', { item: status.id }).then(function (res) { status.reblogs_count = res.data.count; if (status.reblogged == true) { status.reblogged = false; } else { status.reblogged = true; } }).catch(function (err) { swal('Error', 'Something went wrong, please try again later.', 'error'); }); }, timestampFormat: function timestampFormat(timestamp) { var ts = new Date(timestamp); return ts.toDateString() + ' ' + ts.toLocaleTimeString(); }, editUrl: function editUrl(status) { return status.url + '/edit'; }, redirect: function redirect(url) { window.location.href = url; return; }, replyUrl: function replyUrl(status) { var username = this.profile.username; var id = status.account.id == this.profile.id ? status.id : status.in_reply_to_id; return '/p/' + username + '/' + id; }, mentionUrl: function mentionUrl(status) { var username = status.account.username; var id = status.id; return '/p/' + username + '/' + id; }, statusOwner: function statusOwner(status) { var sid = status.account.id; var uid = this.profile.id; if (sid == uid) { return true; } else { return false; } }, fetchStatusComments: function fetchStatusComments(status, card) { axios.get('/api/v2/status/' + status.id + '/replies').then(function (res) { var comments = card.querySelectorAll('.comments')[0]; var data = res.data; data.forEach(function (i, k) { var username = document.createElement('a'); username.classList.add('font-weight-bold'); username.classList.add('text-dark'); username.classList.add('mr-2'); username.setAttribute('href', i.account.url); username.textContent = i.account.username; var text = document.createElement('span'); text.innerHTML = i.content; var comment = document.createElement('p'); comment.classList.add('read-more'); comment.classList.add('mb-0'); comment.appendChild(username); comment.appendChild(text); comments.appendChild(comment); }); }).catch(function (err) {}); }, muteProfile: function muteProfile(status) { var _this5 = this; if ($('body').hasClass('loggedIn') == false) { return; } axios.post('/i/mute', { type: 'user', item: status.account.id }).then(function (res) { _this5.feed = _this5.feed.filter(function (s) { return s.account.id !== status.account.id; }); swal('Success', 'You have successfully muted ' + status.account.acct, 'success'); }).catch(function (err) { swal('Error', 'Something went wrong. Please try again later.', 'error'); }); }, blockProfile: function blockProfile(status) { var _this6 = this; if ($('body').hasClass('loggedIn') == false) { return; } axios.post('/i/block', { type: 'user', item: status.account.id }).then(function (res) { _this6.feed = _this6.feed.filter(function (s) { return s.account.id !== status.account.id; }); swal('Success', 'You have successfully blocked ' + status.account.acct, 'success'); }).catch(function (err) { swal('Error', 'Something went wrong. Please try again later.', 'error'); }); }, deletePost: function deletePost(status, index) { var _this7 = this; if ($('body').hasClass('loggedIn') == false || status.account.id !== this.profile.id) { return; } axios.post('/i/delete', { type: 'status', item: status.id }).then(function (res) { _this7.feed.splice(index, 1); swal('Success', 'You have successfully deleted this post', 'success'); }).catch(function (err) { swal('Error', 'Something went wrong. Please try again later.', 'error'); }); }, commentSubmit: function commentSubmit(status, $event) { var _this8 = this; var id = status.id; var form = $event.target; var input = $(form).find('input[name="comment"]'); var comment = input.val(); var comments = form.parentElement.parentElement.getElementsByClassName('comments')[0]; axios.post('/i/comment', { item: id, comment: comment }).then(function (res) { input.val(''); input.blur(); var username = document.createElement('a'); username.classList.add('font-weight-bold'); username.classList.add('text-dark'); username.classList.add('mr-2'); username.setAttribute('href', _this8.profile.url); username.textContent = _this8.profile.username; var text = document.createElement('span'); text.innerHTML = comment; var wrapper = document.createElement('p'); wrapper.classList.add('read-more'); wrapper.classList.add('mb-0'); wrapper.appendChild(username); wrapper.appendChild(text); comments.insertBefore(wrapper, comments.firstChild); }); } } }); /***/ }), /***/ "./node_modules/babel-loader/lib/index.js?{\"cacheDirectory\":true,\"presets\":[[\"env\",{\"modules\":false,\"targets\":{\"browsers\":[\"> 2%\"],\"uglify\":true}}]],\"plugins\":[\"transform-object-rest-spread\",[\"transform-runtime\",{\"polyfill\":false,\"helpers\":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/components/presenter/MixedAlbumPresenter.vue": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ __webpack_exports__["a"] = ({ props: ['status'] }); /***/ }), /***/ "./node_modules/babel-loader/lib/index.js?{\"cacheDirectory\":true,\"presets\":[[\"env\",{\"modules\":false,\"targets\":{\"browsers\":[\"> 2%\"],\"uglify\":true}}]],\"plugins\":[\"transform-object-rest-spread\",[\"transform-runtime\",{\"polyfill\":false,\"helpers\":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/components/presenter/PhotoAlbumPresenter.vue": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ __webpack_exports__["a"] = ({ props: ['status'] }); /***/ }), /***/ "./node_modules/babel-loader/lib/index.js?{\"cacheDirectory\":true,\"presets\":[[\"env\",{\"modules\":false,\"targets\":{\"browsers\":[\"> 2%\"],\"uglify\":true}}]],\"plugins\":[\"transform-object-rest-spread\",[\"transform-runtime\",{\"polyfill\":false,\"helpers\":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/components/presenter/PhotoPresenter.vue": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // // // // // // // // // // // // // // // // // // // /* harmony default export */ __webpack_exports__["a"] = ({ props: ['status'] }); /***/ }), /***/ "./node_modules/babel-loader/lib/index.js?{\"cacheDirectory\":true,\"presets\":[[\"env\",{\"modules\":false,\"targets\":{\"browsers\":[\"> 2%\"],\"uglify\":true}}]],\"plugins\":[\"transform-object-rest-spread\",[\"transform-runtime\",{\"polyfill\":false,\"helpers\":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/components/presenter/VideoAlbumPresenter.vue": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ __webpack_exports__["a"] = ({ props: ['status'] }); /***/ }), /***/ "./node_modules/babel-loader/lib/index.js?{\"cacheDirectory\":true,\"presets\":[[\"env\",{\"modules\":false,\"targets\":{\"browsers\":[\"> 2%\"],\"uglify\":true}}]],\"plugins\":[\"transform-object-rest-spread\",[\"transform-runtime\",{\"polyfill\":false,\"helpers\":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/components/presenter/VideoPresenter.vue": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ __webpack_exports__["a"] = ({ props: ['status'] }); /***/ }), /***/ "./node_modules/bootstrap-vue/es/components/alert/alert.css": /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a