Total Complexity | 1 |
Complexity/F | 0 |
Lines of Code | 20 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | window._ = require('lodash'); |
||
2 | window.Vue = require('vue'); |
||
3 | |||
4 | // Setup AXIOS |
||
5 | window.axios = require('axios'); |
||
6 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; |
||
7 | |||
8 | let token = document.head.querySelector('meta[name="csrf-token"]'); |
||
9 | |||
10 | if (token) { |
||
11 | window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; |
||
12 | } else { |
||
13 | console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token'); |
||
14 | } |
||
15 | |||
16 | // Inject CSS |
||
17 | var link = document.createElement('link'); |
||
18 | link.rel = 'stylesheet'; |
||
19 | link.href = '/vendor/kustomer/css/kustomer.css'; |
||
20 | document.head.appendChild(link); |
||
21 |