mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 14:08:42 +00:00
chore: load pdf.js only if have pdf content
This commit is contained in:
parent
cd36b3d209
commit
d4d98f6d55
@ -1291,6 +1291,7 @@ $(document).ready(function() {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if ($('div[data-pdf]').length > 0) {
|
||||||
$LAB.script('/js/pdf.js').wait(function() {
|
$LAB.script('/js/pdf.js').wait(function() {
|
||||||
pdfjsLib.GlobalWorkerOptions.workerSrc = '/js/pdf.worker.js';
|
pdfjsLib.GlobalWorkerOptions.workerSrc = '/js/pdf.worker.js';
|
||||||
|
|
||||||
@ -1338,6 +1339,7 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Tooltip
|
// Tooltip
|
||||||
|
Loading…
Reference in New Issue
Block a user