2018-11-08 20:43:32 -07:00
window . Vue = require ( 'vue' ) ;
import BootstrapVue from 'bootstrap-vue'
2018-12-01 21:03:27 -07:00
import InfiniteLoading from 'vue-infinite-loading' ;
import Loading from 'vue-loading-overlay' ;
2018-12-24 23:00:50 -07:00
import VueTimeago from 'vue-timeago' ;
2019-10-15 21:38:47 -06:00
import VueCarousel from 'vue-carousel' ;
2018-12-01 21:03:27 -07:00
2019-10-15 21:38:47 -06:00
Vue . use ( VueCarousel ) ;
2018-11-08 20:43:32 -07:00
Vue . use ( BootstrapVue ) ;
2018-12-01 21:03:27 -07:00
Vue . use ( InfiniteLoading ) ;
Vue . use ( Loading ) ;
2019-05-02 21:09:39 -06:00
Vue . use ( VueTimeago , {
name : 'Timeago' ,
locale : 'en'
2019-05-06 21:26:12 -06:00
} ) ;
2019-05-03 23:11:09 -04:00
2018-11-13 12:43:46 -07:00
pixelfed . readmore = ( ) => {
2018-11-28 19:27:38 -07:00
$ ( '.read-more' ) . each ( function ( k , v ) {
2018-11-13 12:43:46 -07:00
let el = $ ( this ) ;
let attr = el . attr ( 'data-readmore' ) ;
if ( typeof attr !== typeof undefined && attr !== false ) {
return ;
}
el . readmore ( {
2019-04-17 23:02:26 -06:00
collapsedHeight : 45 ,
heightMargin : 48 ,
2019-04-20 13:28:16 -06:00
moreLink : '<a href="#" class="d-block small text-muted text-center">Read more ...</a>' ,
lessLink : '<a href="#" class="d-block small text-muted text-center">Hide</a>' ,
2018-11-13 12:43:46 -07:00
} ) ;
} ) ;
} ;
2018-12-25 15:42:12 -06:00
try {
document . createEvent ( "TouchEvent" ) ;
$ ( 'body' ) . addClass ( 'touch' ) ;
} catch ( e ) {
}
2018-11-08 20:43:32 -07:00
window . filesize = require ( 'filesize' ) ;
import swal from 'sweetalert' ;
2019-10-15 21:38:47 -06:00
$ ( '[data-toggle="tooltip"]' ) . tooltip ( )
2018-11-22 13:21:36 -07:00
const warningTitleCSS = 'color:red; font-size:60px; font-weight: bold; -webkit-text-stroke: 1px black;' ;
const warningDescCSS = 'font-size: 18px;' ;
console . log ( '%cStop!' , warningTitleCSS ) ;
2018-12-25 15:42:12 -06:00
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 ) ;