mydoge-com / mydogemask

Doge wallet chrome extension
Other
19 stars 11 forks source link

Change NFTView.js to use "preview" endpoint for any NFT display. #82

Closed minidogenft closed 3 months ago

minidogenft commented 3 months ago

Fixes #81

Small change to NFTView.js to use "preview" endpoint for any NFT display. checking on content-type is not required anymore, the preview iframe will display all.

Before: code checked content-type to display only image and text based inscriptions. Delegates, videos, or other types of assets would not render.

After: New code only use "preview" IFrame to display anything as this endpoint has the code to display any doginals NFT supported by the protocol.

Here is an example of delegate 3d model/ recursion 3d model / image / recursion game that can display in the wallet with this fix: image

Note: Further css centering might be needed as I noticed some NFTs have the right side of their content a little bit hidden, but that's another topic.

minidogenft commented 3 months ago

did PR #82 with simple fix. using directly an iframe on "preview" endpoint can basically display everything (delegates, recursions, images, raw 3d models, videos, music etc). feel free to review and use.

alexanvl commented 3 months ago

The issue should be resolved by this commit https://github.com/mydoge-com/mydogemask/pull/83/commits/4651ff58db9cef106c7415f43fb696cf499ad684