1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2025-03-04 02:28:08 +00:00
pixelfed/resources/assets/js/bootstrap.js

17 lines
650 B
JavaScript
Raw Normal View History

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