js/decklist/main.js
// Detect if there is PDF support for the autopreview
Detect if there is PDF support for the autopreview
Detect if there is PDF support for the autopreview
function detectPDFPreviewSupport() {
  showpreview = false;
  if (navigator.mimeTypes['application/pdf'] != undefined) { showpreview = true; }
  if (navigator.userAgent.indexOf('Firefox') != -1) {
    if ((navigator.userAgent.indexOf('Mobile') == -1) && (navigator.userAgent.indexOf('Tablet') == -1)) { showpreview = true; }
    else { showpreview = false; } 
  }
}
function detectPDFPreviewSupport ( ) { showpreview = false ; if ( navigator . mimeTypes [ 'application/pdf' ] != undefined ) { showpreview = true ; } if ( navigator . userAgent . indexOf ( 'Firefox' ) != - 1 ) { if ( ( navigator . userAgent . indexOf ( 'Mobile' ) == - 1 ) && ( navigator . userAgent . indexOf ( 'Tablet' ) == - 1 ) ) { showpreview = true ; } else { showpreview = false ; } } }
Detect if there is PDF support for the autopreview
Detect if there is PDF support for the autopreview
// Safari and Chrome have application/pdf in navigator.mimeTypes // Firefox desktop uses pdf.js, but not mobile or tablet // have to reset it, as FF Mobile application/pdf listed, but not supported (wtf?)