1
0
mirror of https://github.com/cydrobolt/polr.git synced 2024-11-13 21:52:29 +01:00
polr/public/js/base.js
2016-10-11 22:47:43 -04:00

20 lines
549 B
JavaScript

// AJAX settings
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
// Escape jQuery selectors
function esc_selector(selector) {
return selector.replace( /(:|\.|\[|\]|,)/g, "\\$1" );
}
// Output helpful console message
console.log('%cPolr', 'font-size:5em;color:green');
console.log('%cNeed help? Open a ticket: https://github.com/cydrobolt/polr', 'color:blue');
console.log('%cDocs: https://docs.polr.me', 'color:blue');
// Set up Angular module
var polr = angular.module('polr',[]);