Index: openacs-4/packages/xotcl-request-monitor/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-request-monitor/www/index.tcl,v diff -u -r1.31.2.6 -r1.31.2.7 --- openacs-4/packages/xotcl-request-monitor/www/index.tcl 17 Feb 2021 08:21:45 -0000 1.31.2.6 +++ openacs-4/packages/xotcl-request-monitor/www/index.tcl 24 Oct 2022 09:00:03 -0000 1.31.2.7 @@ -123,9 +123,21 @@ # security::csp::require script-src code.jquery.com # } - template::add_body_script -src "//code.highcharts.com/highcharts.js" - template::add_body_script -src "//code.highcharts.com/modules/exporting.js" - security::csp::require script-src code.highcharts.com + if {[template::head::can_resolve_urn urn:ad:js:highcharts]} { + # + # The highcharts package is available + # + template::add_body_script -src urn:ad:js:highcharts + template::add_body_script -src urn:ad:js:highcharts/modules/exporting + template::add_body_script -src urn:ad:js:highcharts/modules/accessibility + } else { + # + # The highcharts package is not available, go straight to the CDN. + # + template::add_body_script -src "//code.highcharts.com/highcharts.js" + template::add_body_script -src "//code.highcharts.com/modules/exporting.js" + security::csp::require script-src code.highcharts.com + } proc js_time {clock} { set year [clock format $clock -format %Y] Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.284.2.226 -r1.284.2.227 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 19 Oct 2022 18:29:39 -0000 1.284.2.226 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 24 Oct 2022 09:00:42 -0000 1.284.2.227 @@ -4586,8 +4586,18 @@ if {$with_pie_charts} { if {![info exists ::__xotcl_highcharts_pie]} { - template::add_body_script -src "//code.highcharts.com/highcharts.js" - security::csp::require script-src code.highcharts.com + if {[template::head::can_resolve_urn urn:ad:js:highcharts]} { + # + # The highcharts package is available + # + template::add_body_script -src urn:ad:js:highcharts + } else { + # + # The highcharts package is not available, go straight to the CDN. + # + template::add_body_script -src "//code.highcharts.com/highcharts.js" + security::csp::require script-src code.highcharts.com + } } set graphID pie-[incr ::__xotcl_highcharts_pie] }