mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
18 lines
674 B
JavaScript
Vendored
18 lines
674 B
JavaScript
Vendored
window._ = require('lodash');
|
|
window.Popper = require('popper.js').default;
|
|
window.pixelfed = window.pixelfed || {};
|
|
window.$ = window.jQuery = require('jquery');
|
|
require('bootstrap');
|
|
window.typeahead = require('./lib/typeahead');
|
|
window.Bloodhound = require('./lib/bloodhound');
|
|
window.axios = require('axios');
|
|
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
|
require('readmore-js');
|
|
|
|
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');
|
|
}
|