From 6b84b38f2ad14bdf16bf0629d0cc60a225fb35cd Mon Sep 17 00:00:00 2001 From: Justin Georgi Date: Sun, 20 Oct 2024 17:15:45 -0700 Subject: [PATCH] Improve page specificity Signed-off-by: Justin Georgi --- includes/GlModelViewer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/GlModelViewer.php b/includes/GlModelViewer.php index 6de8bdc..0cf3b56 100644 --- a/includes/GlModelViewer.php +++ b/includes/GlModelViewer.php @@ -16,7 +16,8 @@ class GlModelViewer extends ImageHandler { } public static function onBeforePageDisplay(OutputPage $out) { - if (strpos($out->getHTML(), 'class="glmv-viewer') !== false) { + preg_match('/(getHTML(),$findGltf); + if ($findGltf[0]) { $out->addModules('ext.glmv'); } }