Commit 38ddeda0 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Robert Lyon
Browse files

Bug 1811320: Upgrade pdfjs library to 2.0.943

behatnotneeded

Change-Id: I174de60932c8a5282a2804a28b3b114c3a162ac2
parent ed5c70af
......@@ -2,7 +2,7 @@ PDF.js in Mahara
==================
Website: http://mozilla.github.io/pdf.js/getting_started/#download
Version: 1.9.426
Version: 2.0.943
License: Apache License 2.0
PDF.js is used in the Mahara to provide a javascript library for
......
......@@ -12,11 +12,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable no-var */
'use strict';
var FontInspector = (function FontInspectorClosure() {
var fonts;
var fonts, createObjectURL;
var active = false;
var fontAttribute = 'data-font-name';
function removeSelection() {
......@@ -74,6 +75,8 @@ var FontInspector = (function FontInspectorClosure() {
fonts = document.createElement('div');
panel.appendChild(fonts);
createObjectURL = pdfjsLib.createObjectURL;
},
cleanup: function cleanup() {
fonts.textContent = '';
......@@ -118,10 +121,7 @@ var FontInspector = (function FontInspectorClosure() {
url = /url\(['"]?([^\)"']+)/.exec(url);
download.href = url[1];
} else if (fontObj.data) {
url = URL.createObjectURL(new Blob([fontObj.data], {
type: fontObj.mimeType,
}));
download.href = url;
download.href = createObjectURL(fontObj.data, fontObj.mimeType);
}
download.textContent = 'Download';
var logIt = document.createElement('a');
......@@ -262,7 +262,7 @@ var Stepper = (function StepperClosure() {
if (typeof args === 'string') {
var MAX_STRING_LENGTH = 75;
return args.length <= MAX_STRING_LENGTH ? args :
args.substr(0, MAX_STRING_LENGTH) + '...';
args.substring(0, MAX_STRING_LENGTH) + '...';
}
if (typeof args !== 'object' || args === null) {
return args;
......@@ -337,7 +337,7 @@ var Stepper = (function StepperClosure() {
line.className = 'line';
line.dataset.idx = i;
chunk.appendChild(line);
var checked = this.breakPoints.indexOf(i) !== -1;
var checked = this.breakPoints.includes(i);
var args = operatorList.argsArray[i] || [];
var breakCell = c('td');
......@@ -461,7 +461,6 @@ var Stats = (function Stats() {
manager: null,
init(pdfjsLib) {
this.panel.setAttribute('style', 'padding: 5px;');
pdfjsLib.PDFJS.enableStats = true;
},
enabled: false,
active: false,
......@@ -520,7 +519,7 @@ window.PDFBug = (function PDFBugClosure() {
}
for (var i = 0; i < tools.length; ++i) {
var tool = tools[i];
if (all || ids.indexOf(tool.id) !== -1) {
if (all || ids.includes(tool.id)) {
tool.enabled = true;
}
}
......
......@@ -60,7 +60,12 @@ page_rotate_ccw.title=Wire i tung lacam
page_rotate_ccw.label=Wire i tung lacam
page_rotate_ccw_label=Wire i tung lacam
cursor_text_select_tool.title=Cak gitic me yero coc
cursor_text_select_tool_label=Gitic me yero coc
cursor_hand_tool.title=Cak gitic me cing
cursor_hand_tool_label=Gitic cing
# Document properties dialog box
document_properties.title=Jami me gin acoya…
......@@ -86,6 +91,27 @@ document_properties_creator=Lacwec:
document_properties_producer=Layub PDF:
document_properties_version=Kit PDF:
document_properties_page_count=Kwan me pot buk:
document_properties_page_size=Dit pa potbuk:
document_properties_page_size_unit_inches=i
document_properties_page_size_unit_millimeters=mm
document_properties_page_size_orientation_portrait=atir
document_properties_page_size_orientation_landscape=arii
document_properties_page_size_name_a3=A3
document_properties_page_size_name_a4=A4
document_properties_page_size_name_letter=Waraga
document_properties_page_size_name_legal=Cik
# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
# the size, respectively their unit of measurement and orientation, of the (current) page.
document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
# the document; usually called "Fast Web View" in English locales of Adobe software.
document_properties_linearized_yes=Eyo
document_properties_linearized_no=Pe
document_properties_close=Lor
print_progress_message=Yubo coc me agoya…
......@@ -98,7 +124,9 @@ print_progress_close=Juki
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_sidebar.title=Lok gintic ma inget
toggle_sidebar_notification.title=Lok lanyut me nget (wiyewiye tye i gin acoya/attachments)
toggle_sidebar_label=Lok gintic ma inget
document_outline.title=Nyut Wiyewiye me Gin acoya (dii-kiryo me yaro/kano jami weng)
document_outline_label=Pek pa gin acoya
attachments.title=Nyut twec
attachments_label=Twec
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment