GithubHelp home page GithubHelp logo

nilsenevoldsen / scryfalllinks Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 2.0 3.01 MB

MediaWiki extension that creates Scryfall links from Magic: The Gathering card names

License: MIT License

PHP 31.41% JavaScript 56.58% Less 12.01%

scryfalllinks's People

Contributors

addshore avatar applehat avatar aspallar avatar atlight avatar dependabot[bot] avatar edg2s avatar fhocutt avatar hanmac avatar harshkothari410 avatar hashar avatar huji avatar janzerebecki avatar jdforrester avatar kaldari avatar krinkle avatar legoktm avatar liangent avatar mary-kate avatar ndrewh avatar nilsenevoldsen avatar paladox avatar reedy avatar rmoen avatar samwilson avatar shantanoo avatar siebrand avatar soundslocke avatar tosfos avatar translatewiki avatar umherirrender avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

hanmac aspallar

scryfalllinks's Issues

v1.4.1

@valeryan @yandere-sliver FYI there have been some significant changes in the past few days that might interest you.

  • ea5e096 replaces .then() Promise chains with async/await syntactic sugar.
  • cb933b6 upgrades to Tippy.js v3 (atomiks/tippyjs#201) with better naming conventions
  • e5a27d4 is a major refactor primarily intended to improve performance via simultaneous fetches, although it turns out not to make much of a difference. It might still be beneficial on certain connection profiles.
  • 48a69b5 adds caching, which makes previously loaded popups load instantly
  • 8c6131d is a hacky workaround for #22 , correcting the popups that were mispositioned due to Gamepedia's "netbar"

The latter two are nice visible improvements for users.

Modal dual-faced cards

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?

mtg wiki runs on an outdated version

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.

Remove cruft

Can maybe remove ext.scryfallLinks.less and ext.scryfallLinks.js.

Mystery Booster playtest split cards should not be rotated

Mystery Booster playtest split cards should be vertical orientation. Need to add an exception here.

if ( data.layout === 'transform' || data.layout === 'modal_dfc' || data.layout === 'double_faced_token' ) {
if ( isSecondface ) {
fastBranchIsInvalid = true;
tip.reference.href = permapageUri.href + '&back';
}
} else if ( data.layout === 'split' ) {
// eslint-disable-next-line no-restricted-properties
if ( data.card_faces[ 1 ].oracle_text.startsWith( 'Aftermath' ) ) {
if ( isSecondface ) {
img.classList.add( 'ext-scryfall-rotate-90ccw' );
// We add rotationClass to the reference attributes to cache it
tip.reference.dataset.rotationClass = 'ext-scryfall-rotate-90ccw';
}
} else {
img.classList.add( 'ext-scryfall-rotate-90cw' );
tip.reference.dataset.rotationClass = 'ext-scryfall-rotate-90cw';
}
} else if ( data.layout === 'flip' ) {
if ( isSecondface ) {
img.classList.add( 'ext-scryfall-rotate-180' );
tip.reference.dataset.rotationClass = 'ext-scryfall-rotate-180';
}
}

Regex wishlist/idealist

  • Mana symbol wildcard (::sm::: colored, colorless, generic, phyrexian, hybrid, twobrid, snow, X/Y/Z, halves, hundred, million, infinity, โ€ฆ?)
    • Variant: Symbols wildcard (::s::: ::sm::+ tapping, untapping, loyalty, chaos, energy, etc)
    • Variant: Mana "class" wildcards (::phyrexian::, ::hybrid::, etc)
  • Single/multiline mode toggle (o:/flying*scry/ vs o:/flying*scry/m)
    • What default?
  • Single character wildcard (.)
  • Zero-or-more token repetitions (*)
  • One-or-more token repetitions (+) (Current + only works with certain tokens)
  • Whitespace wildcard (\s), non-whitespace wildcard (\S)
  • Card-field name wildcards other than ~ (::subtype::) (Gatherer feature parity)
  • Type wildcards (::creaturesubtype:: to match any creature subtype)
  • Backreferences

Method of "preferring" blocks and sets per-page, per-deck, and per-card.

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.

Sometimes popups don't appear

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.

Transformed cards will not search properly

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.)

Exception thrown on Special:SpecialPages

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

Reenable on mobile

This used to work on mobile on mtg.gamepedia.com, but it doesn't now. Perhaps the MobileFrontend extension got installed?

Reduce tooltip delay+animation, follow cursor

	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.

Sometimes back face shows front face

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().

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.