diff --git a/app/pub/scripts/klanviewer.js b/app/pub/scripts/klanviewer.js index 93aaa13..b94fc24 100644 --- a/app/pub/scripts/klanviewer.js +++ b/app/pub/scripts/klanviewer.js @@ -166,6 +166,7 @@ function startpdfviewer(newcurr){ } var detect = new MobileDetect(window.navigator.userAgent); + var isOpera = window.opera | window.opr | ( navigator.userAgent.indexOf(' OPR/') > -1 ) | ( navigator.userAgent.indexOf(' Coast/') > -1 ) | ( navigator.userAgent.indexOf(' OPiOS/') > -1 ); if (category == 1){ embed = false; @@ -175,10 +176,9 @@ function startpdfviewer(newcurr){ embed = false; } - if(navigator.userAgent.indexOf("Opera")){ + if(isOpera){ embed = true; } - if (embed){ document.getElementById(pdfcanvas).innerHTML = ''; diff --git a/app/views/layout.phtml b/app/views/layout.phtml index 708b610..e3f81ac 100644 --- a/app/views/layout.phtml +++ b/app/views/layout.phtml @@ -4,7 +4,7 @@ "> - +