kopia lustrzana https://github.com/pixelfed/pixelfed
Update bootstrap.js
rodzic
242a0483b8
commit
7d152a7b54
|
@ -5,3 +5,12 @@ window.$ = window.jQuery = require('jquery');
|
||||||
require('bootstrap');
|
require('bootstrap');
|
||||||
window.typeahead = require('./lib/typeahead');
|
window.typeahead = require('./lib/typeahead');
|
||||||
window.Bloodhound = require('./lib/bloodhound');
|
window.Bloodhound = require('./lib/bloodhound');
|
||||||
|
window.axios = require('axios');
|
||||||
|
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||||
|
|
||||||
|
let token = document.head.querySelector('meta[name="csrf-token"]');
|
||||||
|
if (token) {
|
||||||
|
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
|
||||||
|
} else {
|
||||||
|
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
|
||||||
|
}
|
||||||
|
|
|
@ -4,17 +4,8 @@ Vue.use(BootstrapVue);
|
||||||
|
|
||||||
window.InfiniteScroll = require('infinite-scroll');
|
window.InfiniteScroll = require('infinite-scroll');
|
||||||
window.filesize = require('filesize');
|
window.filesize = require('filesize');
|
||||||
window.axios = require('axios');
|
|
||||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
|
||||||
import swal from 'sweetalert';
|
import swal from 'sweetalert';
|
||||||
|
|
||||||
let token = document.head.querySelector('meta[name="csrf-token"]');
|
|
||||||
if (token) {
|
|
||||||
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
|
|
||||||
} else {
|
|
||||||
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
|
|
||||||
}
|
|
||||||
|
|
||||||
require('./components/localstorage');
|
require('./components/localstorage');
|
||||||
require('./components/likebutton');
|
require('./components/likebutton');
|
||||||
require('./components/commentform');
|
require('./components/commentform');
|
||||||
|
|
Ładowanie…
Reference in New Issue