1
0

components.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. window.Vue = require('vue');
  2. import BootstrapVue from 'bootstrap-vue'
  3. import InfiniteLoading from 'vue-infinite-loading';
  4. import Loading from 'vue-loading-overlay';
  5. import VueTimeago from 'vue-timeago';
  6. import VueCarousel from 'vue-carousel';
  7. import VueBlurHash from 'vue-blurhash'
  8. import 'vue-blurhash/dist/vue-blurhash.css'
  9. Vue.use(VueBlurHash);
  10. Vue.use(VueCarousel);
  11. Vue.use(BootstrapVue);
  12. Vue.use(InfiniteLoading);
  13. Vue.use(Loading);
  14. Vue.use(VueTimeago, {
  15. name: 'Timeago',
  16. locale: 'en'
  17. });
  18. pixelfed.readmore = () => {
  19. $('.read-more').each(function(k,v) {
  20. let el = $(this);
  21. let attr = el.attr('data-readmore');
  22. if(typeof attr !== typeof undefined && attr !== false) {
  23. return;
  24. }
  25. el.readmore({
  26. collapsedHeight: 45,
  27. heightMargin: 48,
  28. moreLink: '<a href="#" class="d-block small text-muted text-center">Read more ...</a>',
  29. lessLink: '<a href="#" class="d-block small text-muted text-center">Hide</a>',
  30. });
  31. });
  32. };
  33. try {
  34. document.createEvent("TouchEvent");
  35. $('body').addClass('touch');
  36. } catch (e) {
  37. }
  38. window.filesize = require('filesize');
  39. import swal from 'sweetalert';
  40. $('[data-toggle="tooltip"]').tooltip()
  41. const warningTitleCSS = 'color:red; font-size:60px; font-weight: bold; -webkit-text-stroke: 1px black;';
  42. const warningDescCSS = 'font-size: 18px;';
  43. console.log('%cStop!', warningTitleCSS);
  44. console.log("%cThis is a browser feature intended for developers. If someone told you to copy and paste something here to enable a Pixelfed feature or \"hack\" someone's account, it is a scam and will give them access to your Pixelfed account.", warningDescCSS);