add el_title

This commit is contained in:
Andrey Kuvshinov
2020-04-29 09:46:42 +03:00
parent ae1c448e75
commit 968ae9c036
3 changed files with 8 additions and 7 deletions

View File

@@ -12,10 +12,8 @@ document.getElementById('pdfprogress').innerHTML = 'Идет подготовк
// Asynchronous download of PDF // Asynchronous download of PDF
var loadingTask = pdfjsLib.getDocument(url); var loadingTask = pdfjsLib.getDocument(url);
loadingTask.promise.then(function(pdf) { loadingTask.promise.then(function(pdf) {
console.log('PDF loaded'); document.getElementById('pdfprogress').innerHTML = 'Загружаем pdf. Пожалуйста подождите...';
document.getElementById('pdfprogress').innerHTML = 'Загружаем pdf. Пожалуйста подождите... ...';
// Fetch the first page
pdf.getPage(pageNumber).then(function(page) { pdf.getPage(pageNumber).then(function(page) {
document.getElementById('pdfprogress').innerHTML = 'Идет обработка страницы ...'; document.getElementById('pdfprogress').innerHTML = 'Идет обработка страницы ...';

View File

@@ -3,8 +3,10 @@ var pdfjsLib = window['pdfjs-dist/build/pdf'];
function renderPage() { function renderPage() {
var el_title = document.getElementById('pdfprogress');
document.getElementById('pdfprogress').innerHTML = 'Идет подготовка страницы ...';
el_title.innerHTML = 'Идет подготовка страницы ...';
pageRendering = true; pageRendering = true;
// Using promise to fetch the page // Using promise to fetch the page
@@ -30,12 +32,13 @@ function renderPage() {
// New page rendering is pending // New page rendering is pending
renderPage(pageNumPending); renderPage(pageNumPending);
pageNumPending = null; pageNumPending = null;
document.getElementById('zoompdf').innerHTML = scale + 'x';
el_title.innerHTML = 'Приятного чтения ↓';
} }
}); });
}); });
document.getElementById('zoompdf').innerHTML = scale + 'x';
document.getElementById('pdfprogress').innerHTML = 'Приятного чтения ↓';
} }

View File

@@ -2,7 +2,7 @@
<head> <head>
<title>Еженедельник Аргументы Недели - <?=$title?></title> <title>Еженедельник Аргументы Недели - <?=$title?></title>
<script src="/pub/scripts/pdf.min.js"></script> <script src="/pub/scripts/pdf.min.js"></script>
<script src="/pub/scripts/anviewer.js?ver=10"></script> <script src="/pub/scripts/anviewer.js?ver=11"></script>
<link rel="stylesheet" type="text/css" href="/pub/css/an.css?ver=26"> <link rel="stylesheet" type="text/css" href="/pub/css/an.css?ver=26">
<link rel="icon" type="image/ico" href="https://argumenti.ru/favicon.ico"> <link rel="icon" type="image/ico" href="https://argumenti.ru/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">