1
0
Fork 0
forked from mirror/pixelfed
pixelfed/resources/assets/js/bootstrap.js

17 lines
650 B
JavaScript
Raw Normal View History

2018-04-15 23:56:48 +00:00
window._ = require('lodash');
window.Popper = require('popper.js').default;
2018-11-09 03:25:49 +00:00
window.pixelfed = window.pixelfed || {};
2018-10-22 01:48:57 +00:00
window.$ = window.jQuery = require('jquery');
require('bootstrap');
2018-11-04 04:08:32 +00:00
window.typeahead = require('./lib/typeahead');
window.Bloodhound = require('./lib/bloodhound');
2018-11-09 05:01:59 +00:00
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');
}