mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-29 17:53:16 +00:00
Update bootstrap.js
This commit is contained in:
parent
242a0483b8
commit
7d152a7b54
2 changed files with 9 additions and 9 deletions
9
resources/assets/js/bootstrap.js
vendored
9
resources/assets/js/bootstrap.js
vendored
|
@ -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');
|
||||||
|
}
|
||||||
|
|
9
resources/assets/js/components.js
vendored
9
resources/assets/js/components.js
vendored
|
@ -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');
|
||||||
|
|
Loading…
Reference in a new issue