nilsenevoldsen / scryfalllinks Goto Github PK
View Code? Open in Web Editor NEWMediaWiki extension that creates Scryfall links from Magic: The Gathering card names
License: MIT License
MediaWiki extension that creates Scryfall links from Magic: The Gathering card names
License: MIT License
Should tooltip open on tap? Then image links to SF?
Should image also be link to SF on desktop?
I think this extension isn't supposed to use features beyond ES3 in order to be compatible with ResourceLoader. https://phabricator.wikimedia.org/T75714
Lines 11 to 13 in 92d72d2
I used a higher version because I didn't know better and it appears to work. I'm going to wontfix this issue, but keep it open for informational purposes, or in case some contributor is ambitious.
@valeryan @yandere-sliver FYI there have been some significant changes in the past few days that might interest you.
.then()
Promise chains with async
/await
syntactic sugar.The latter two are nice visible improvements for users.
oo-ui-popupWidget-popup
catches all OOjs popups.
For some reason the backside does not show up for the modal dual-faced cards.
Is that an issue with Scryfall or with the extention?
Hi,
I looked up what version we are running in the mtg wiki and realized that ours is outdated.
I asked the gamepedia stuff if they could do an updated and I was told that there is still an important issue unresolved in the pull request.
Thank you very much.
For backwards compatibility. Not sure what expected behavior is, tbh. Maybe we don't need to support this?
Or drop fetch()
.
https://scryfall.com/card/ust/3a/amateur-auteur?utm_source=mw_MTGWiki
When we are searching for a card I think it would be good if we could manipulate the 3a part of the url somehow. Otherwise I am not sure how you can search for different versions of the same card in the same set.
Can maybe remove ext.scryfallLinks.less
and ext.scryfallLinks.js
.
On, for example, https://mtg.gamepedia.com/Planechase_Anthology#Set_details, you can see that the card images for planes are displayed sideways. The same applies to phenomena.
Such as "Other spells"
Mystery Booster playtest split cards should be vertical orientation. Need to add an exception here.
ScryfallLinks/resources/ext.scryfallLinks.tooltip.js
Lines 47 to 69 in 3ab569d
id
etc.
Can be observed here:
https://mtg.gamepedia.com/Guilds_of_Ravnica/Guild_kit_decks
With the Boros deck and the card Sunhome, Fortress of the Legion.
::sm::
: colored, colorless, generic, phyrexian, hybrid, twobrid, snow, X/Y/Z, halves, hundred, million, infinity, โฆ?)
::s::
: ::sm::
+ tapping, untapping, loyalty, chaos, energy, etc)::phyrexian::
, ::hybrid::
, etc)o:/flying*scry/
vs o:/flying*scry/m
)
.
)*
)+
) (Current +
only works with certain tokens)\s
), non-whitespace wildcard (\S
)~
(::subtype::
) (Gatherer feature parity)::creaturesubtype::
to match any creature subtype)I think this was a simple oversight.
Would be nice to have have a way of saying "this is a Time Spiral page, prefer e:TSP
if available". Or, "this is a cawblade deck, prefer e:m11
, b:zen
, b:som
if available". Or even, if especially ambitious, "this was a standard deck on May 6, 2001, prefer standard-legal sets if available".
Card tags would override.
Related to #8.
I don't have a replicable test case, but sometimes popups don't appear. Nothing amiss appears in the console. When I reload the page, or ?debug=true
, they start working. If this happens to anybody else, that'd be good to know.
Maybe I should put some status messages in the console to diagnose this.
Searching for Delver of Secrets will give you Delver of Secrets.
However searching for Insectile Aberration will also give you Delver of Secrets.
Can this somehow be managed that searching for the Transformed card Face will actually give you the transformed card face?
(Meld cards don't have the issue by the way only Transform cards.)
MediaWiki 1.34.0
PHP 7.2.24-0ubuntu0.18.04.3 (apache2handler)
MySQL 5.7.29-0ubuntu0.18.04.1
The SpecialPages entry in extension.json is causing Special:SpecialPages to throw Fatal exception of type "InvalidArgumentException"
"SpecialPages": {
"DownloadDeck": [
"MediaWiki\\Extension\\ScryfallLinks\\SpecialDownloadDeck"
]
},
Everything appears to work fine when it is removed.
Regards
Aspallar
This used to work on mobile on mtg.gamepedia.com, but it doesn't now. Perhaps the MobileFrontend extension got installed?
followCursor: true,
delay: [ 50, 0 ],
animation: 'fade',
duration: 0,
Need to gauge user feedback on this.
Ideally if we did this we'd also remove the card back image, and make the tooltip invisible until the image is loaded.
Someone who actually knows JS should review ext.scryfallLinks.tooltip.js
.
The <d>
decklists make anchor links point at the wrong section of the page, because they change the height of the page after it finishes loading. For an example, follow the deck links at https://mtg.gamepedia.com/Magic:_The_Gathering_Arena#Starter_pack.
I think what's happening is that the fast path finishes fetching the front-face image before the correct path can abort it. Then the correct path sets the imgUri to the back face, and then the fast path overwrites the imgUri with the front face. This happens because the entire fast path isn't aborted, just the fetch โ and it's too late to abort the fetch.
I thought the fetch would be the long-duration part of the fast execution path, but it seems that response.blob() can actually take longer than the fetch().
Ideally they would not cover up the text you are currently focused on
Video: https://s.csuhta.com/Nq1k2mTXZi.mp4
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.