Improve page specificity
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
@@ -16,7 +16,8 @@ class GlModelViewer extends ImageHandler {
|
||||
}
|
||||
|
||||
public static function onBeforePageDisplay(OutputPage $out) {
|
||||
if (strpos($out->getHTML(), 'class="glmv-viewer') !== false) {
|
||||
preg_match('/(<a href="\S*?\.(glb|gltf"))/',$out->getHTML(),$findGltf);
|
||||
if ($findGltf[0]) {
|
||||
$out->addModules('ext.glmv');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user