RillingDev / yugioh-deck-tool

A tool to share and edit decks, view deck prices, and much more.
https://ygoprodeck.com/card-database/deck-prices/
Apache License 2.0
48 stars 9 forks source link

Re-evaluate handling of decks in URI #137

Closed RillingDev closed 9 months ago

RillingDev commented 1 year ago

As suggested:

kevinlul commented 1 year ago

Suggestion: ydke=main!extra!side!name. This URL parameter and format will be shimmed by DawnbrandBots/deck-transfer-for-master-duel#8 for the time being.

kevinlul commented 1 year ago

The next version of the extension will check for a ydkeQueryString flag and disable the shim https://github.com/DawnbrandBots/deck-transfer-for-master-duel/commit/5343125e0e64d0f6041f2b8bcf8757b5510e48d5. This will allow the deck builder to avoid redundancy if and when this is natively implemented :)

RillingDev commented 1 year ago

Suggestion: ydke=main!extra!side!name.

I am leaning towards keeping the name as a seperate query parameter, as it does not seem to be encoded in the YDKE URI by other tools, what are your thoughts on this?

RillingDev commented 1 year ago

Progress in https://github.com/FelixRilling/yugioh-deck-tool/tree/feature/new-uri-deck

kevinlul commented 1 year ago

You're free to include the name after the third !, it works out.

RillingDev commented 1 year ago

alright, so the current implementation is: if the y query parameter is supplied, its content will be loaded as a deck. the content is expected to be YDKE-data, followed by the deck name. the entire query parameter content should be URL encoded

kevinlul commented 1 year ago

Is this the idea? y=${encodeURIComponent("ydke://main!extra!side!name")}

RillingDev commented 1 year ago

Almost, its only the data portion of the YDKE, so y=${encodeURIComponent("main!extra!side!name")}

kevinlul commented 5 months ago

FYI, the released version of the extension this week no longer uses the shim and uses the native feature described here. Firefox, Chrome, Edge, and Safari clients should be switching over. Opera has yet to publish the version, but Opera users may have installed the Chrome version.