pixelfed/resources/assets/js/bootstrap.js

22 lines
845 B
JavaScript
Raw Normal View History

2018-04-15 23:56:48 +00:00
window._ = require('lodash');
window.Popper = require('popper.js').default;
2018-08-10 03:50:09 +00:00
import swal from 'sweetalert';
2018-10-22 01:48:57 +00:00
window.pixelfed = {};
window.$ = window.jQuery = require('jquery');
require('bootstrap');
2018-11-04 04:08:32 +00:00
window.InfiniteScroll = require('infinite-scroll');
window.filesize = require('filesize');
window.typeahead = require('./lib/typeahead');
window.Bloodhound = require('./lib/bloodhound');
2018-10-22 01:48:57 +00:00
window.Vue = require('vue');
import BootstrapVue from 'bootstrap-vue'
Vue.use(BootstrapVue);
2018-04-15 23:56:48 +00:00
window.axios = require('axios');
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
2018-11-04 04:08:32 +00:00
2018-04-15 23:56:48 +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');
2018-11-04 04:08:32 +00:00
}