Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for the deck sort order as a parameter for direct linking #71

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Interested in directly linking to [decklist.org](https://www.decklist.org) for y
- **`deckdesigner`**: designer of the deck (e.g. CubeApril)
- **`deckmain`**: the deck itself; this can be in any format the website understands (use `%0A` for newlines)
- **`deckside`**: the side itself; this can be in any format the website understands (use `%0A` for newlines)
- **`decksort`**: change the order of the cards in the mainboard and sideboard (choices: `alphabetical`, `cmc`, `color`, `numeric`, `original`, `type`, defaults to `color`)
- **`disableediting`**: prevent users from editing the fields above
- **`logo`**: please contact [[email protected]](mailto:[email protected]), if you'd like to replace the DCI logo

Expand Down
5 changes: 5 additions & 0 deletions js/decklist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ function parseGET() {
if ($._GET[ 'uploadURL' ] !== undefined) {
$('#upload').css('display', 'inline-block');
}

// process the decksort param, if present
if ($._GET['decksort'] !== undefined) {
$('#sort-' + $._GET['decksort']).click();
}
}

// Detect if there is PDF support for the autopreview
Expand Down