From 1b93b8c51be6df745821ca5ed093b29468f165ef Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 3 Nov 2022 11:55:07 +0000 Subject: [PATCH] Fix JS to support more Acrobat versions. Fixes https://gitlab.com/kicad/code/kicad/issues/12819 --- common/plotters/PDF_plotter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/plotters/PDF_plotter.cpp b/common/plotters/PDF_plotter.cpp index 578df37527..7efc31828a 100644 --- a/common/plotters/PDF_plotter.cpp +++ b/common/plotters/PDF_plotter.cpp @@ -1214,9 +1214,9 @@ bool PDF_PLOTTER::EndPlot() js += wxT( "]; " ); js += wxT( "var cChoice = app.popUpMenuEx.apply\\( app, aParams \\); " ); - js += wxT( "if\\( cChoice != null && cChoice.startsWith\\( '#' \\) \\)" + js += wxT( "if\\( cChoice != null && cChoice.substring\\( 0, 1 \\) == '#' \\)" " this.pageNum = cChoice.slice\\( 1 \\); " ); - js += wxT( "else if\\( cChoice != null && cChoice.startsWith\\( 'http' \\) \\)" + js += wxT( "else if\\( cChoice != null && cChoice.substring\\( 0, 4 \\) == 'http' \\)" " app.launchURL\\( cChoice \\);" ); startPdfObject( menuHandle );