From 67b8f999c190dc062a27e0a93ca8b6366d5b8957 Mon Sep 17 00:00:00 2001 From: Justin Georgi Date: Tue, 12 Nov 2024 08:20:00 -0700 Subject: [PATCH] Bump tp version 0.1.0 and cleanup Signed-off-by: Justin Georgi --- extension.json | 2 +- includes/GlModelHandler.php | 20 -------------------- includes/GlModelHooks.php | 7 ------- modules/glmv-upl.js | 4 ---- 4 files changed, 1 insertion(+), 32 deletions(-) diff --git a/extension.json b/extension.json index a55c5dc..4c5dce0 100644 --- a/extension.json +++ b/extension.json @@ -3,7 +3,7 @@ "author": "Justin Georgi", "url": "https://gitea.azgeorgis.net/jgeorgi/mwModelViewer", "description": "This extension allows .glb and .gltf files to be added, displayed, and annotated in MediaWiki", - "version": "0.0.7", + "version": "0.1.0", "license-name": "MIT", "type": "media", "manifest_version": 2, diff --git a/includes/GlModelHandler.php b/includes/GlModelHandler.php index 6243498..8f3dbfd 100644 --- a/includes/GlModelHandler.php +++ b/includes/GlModelHandler.php @@ -134,26 +134,6 @@ class GlModelHandler extends ImageHandler { ]; } - - /** - * This is used to generate an array element for each metadata value. That array is then used to generate the table of metadata values on the image page. - * - * @param array &$array An array containing elements for each type of visibility and each of those elements being an array of metadata items. This function adds a value to that array. - * @param string $visibility ('visible' or 'collapsed') if this value is hidden by default. - * @param string $type Type of metadata tag (currently always 'exif') - * @param string $id The name of the metadata tag (like 'artist' for example). its name in the table displayed is the message "$type-$id" (Ex exif-artist ). - * @param string $value Thingy goes into a wikitext table; it used to be escaped but that was incompatible with previous practise of customized display with wikitext formatting via messages such as 'exif-model-value'. So the escaping is taken back out, but generally this seems a confusing interface. - * @param bool | string $param Value to pass to the message for the name of the field as $1. Currently this parameter doesn't seem to ever be used. - */ - //public static function addMeta (&$array, $visibility, $type, $id, $value, $param = false ) { - // $array[$visibility][] = [ - // 'id' => "$type-$id", - // 'name' => $name, - // 'value' => $value - // ]; - //} - - /** * Get image size information and metadata array. * diff --git a/includes/GlModelHooks.php b/includes/GlModelHooks.php index 34e0171..c03884b 100644 --- a/includes/GlModelHooks.php +++ b/includes/GlModelHooks.php @@ -42,13 +42,6 @@ class GlModelHooks { * @param OutputPage $out compiled page html and manipulation methods */ public static function onBeforePageDisplay($out) { - $file = MediaWikiServices::getInstance()->getRepoGroup()->findFile($out->getTitle()); - if ($file) { - echo ''; - } preg_match('/(getHTML(),$findGltf); if ($findGltf[0]) { diff --git a/modules/glmv-upl.js b/modules/glmv-upl.js index d0d8615..a3ef9e2 100644 --- a/modules/glmv-upl.js +++ b/modules/glmv-upl.js @@ -10,10 +10,6 @@ checkForGltf = function (e) { const mvPreview = document.createElement('model-viewer') mvPreview.style['width'] = '180px' mvPreview.style['height'] = '180px' - mvPreview.addEventListener('load',(e) => { - mw.storage.session.set( 'mw_glbMeta', JSON.stringify($(e.target.originalGltfJson.asset))) - }, - {once: true}) const dThumbCap = document.createElement('div') dThumbCap.classList.add('thumbcaption')