mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Remove the FIREFOX
build flag, since it's completely unused
After PR 9566, which removed all of the old Firefox extension code, the `FIREFOX` build flag is no longer used for anything. It thus seems to me that it should be removed, for a couple of reasons: - It's simply dead code now, which only serves to add confusion when looking at the `PDFJSDev` calls. - It used to be that `MOZCENTRAL` and `FIREFOX` was *almost* always used together. However, ever since PR 9566 there's obviously been no effort put into keeping the `FIREFOX` build flags up to date. - In the event that a new, Webextension based, Firefox addon is created in the future you'd still need to audit all `MOZCENTRAL` (and possibly `CHROME`) build flags to see what'd make sense for the addon.
This commit is contained in:
parent
ead03b513c
commit
7322a24ce4
13 changed files with 30 additions and 65 deletions
|
@ -373,8 +373,7 @@ class TextLayerBuilder {
|
|||
if (this.enhanceTextSelection && this.textLayerRenderTask) {
|
||||
this.textLayerRenderTask.expandTextDivs(true);
|
||||
if (
|
||||
(typeof PDFJSDev === "undefined" ||
|
||||
!PDFJSDev.test("FIREFOX || MOZCENTRAL")) &&
|
||||
(typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) &&
|
||||
expandDivsTimer
|
||||
) {
|
||||
clearTimeout(expandDivsTimer);
|
||||
|
@ -387,10 +386,7 @@ class TextLayerBuilder {
|
|||
if (!end) {
|
||||
return;
|
||||
}
|
||||
if (
|
||||
typeof PDFJSDev === "undefined" ||
|
||||
!PDFJSDev.test("FIREFOX || MOZCENTRAL")
|
||||
) {
|
||||
if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) {
|
||||
// On non-Firefox browsers, the selection will feel better if the height
|
||||
// of the `endOfContent` div is adjusted to start at mouse click
|
||||
// location. This avoids flickering when the selection moves up.
|
||||
|
@ -414,10 +410,7 @@ class TextLayerBuilder {
|
|||
|
||||
div.addEventListener("mouseup", () => {
|
||||
if (this.enhanceTextSelection && this.textLayerRenderTask) {
|
||||
if (
|
||||
typeof PDFJSDev === "undefined" ||
|
||||
!PDFJSDev.test("FIREFOX || MOZCENTRAL")
|
||||
) {
|
||||
if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) {
|
||||
expandDivsTimer = setTimeout(() => {
|
||||
if (this.textLayerRenderTask) {
|
||||
this.textLayerRenderTask.expandTextDivs(false);
|
||||
|
@ -434,10 +427,7 @@ class TextLayerBuilder {
|
|||
if (!end) {
|
||||
return;
|
||||
}
|
||||
if (
|
||||
typeof PDFJSDev === "undefined" ||
|
||||
!PDFJSDev.test("FIREFOX || MOZCENTRAL")
|
||||
) {
|
||||
if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) {
|
||||
end.style.top = "";
|
||||
}
|
||||
end.classList.remove("active");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue