mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-03-01 09:15:40 +00:00
Update js, move bootstrap.js to app.js
This commit is contained in:
parent
daf8b00c80
commit
5d24b254e5
2 changed files with 15 additions and 16 deletions
16
resources/assets/js/app.js
vendored
16
resources/assets/js/app.js
vendored
|
@ -1 +1,15 @@
|
||||||
require('./bootstrap');
|
window._ = require('lodash');
|
||||||
|
window.Popper = require('popper.js').default;
|
||||||
|
window.pixelfed = window.pixelfed || {};
|
||||||
|
window.$ = window.jQuery = require('jquery');
|
||||||
|
require('bootstrap');
|
||||||
|
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');
|
||||||
|
}
|
||||||
|
|
15
resources/assets/js/bootstrap.js
vendored
15
resources/assets/js/bootstrap.js
vendored
|
@ -1,15 +0,0 @@
|
||||||
window._ = require('lodash');
|
|
||||||
window.Popper = require('popper.js').default;
|
|
||||||
window.pixelfed = window.pixelfed || {};
|
|
||||||
window.$ = window.jQuery = require('jquery');
|
|
||||||
require('bootstrap');
|
|
||||||
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');
|
|
||||||
}
|
|
Loading…
Reference in a new issue