1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-27 10:16:47 +00:00
pixelfed/resources/assets/js/bootstrap.js

18 lines
674 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';
2018-11-13 19:44:59 +00:00
require('readmore-js');
2018-11-09 05:01:59 +00:00
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');
}