Skip to content

Commit

Permalink
upload: Also relax parsing requirements on frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
kodawah committed Dec 31, 2024
1 parent 53c4411 commit 36d52e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion templates/upload.html
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ <h1>Welcome to {{.Title}}</h1>
};
window.askForURL = function(){
let url = prompt("Please enter your URL here", "{{.RemoteLinkURL}}");
if (url != null && (url.startsWith("https://docs.google.com/spreadsheets/") || url.startsWith("https://store.tcgplayer.com/collection/view/") || url.startsWith("https://www.moxfield.com/decks/") || url == "")) {
if (url != null && (url.includes("docs.google.com") || url.includes("store.tcgplayer.com") || url.includes("moxfield.com") || url == "")) {
if (url == "") {
urlLabel.innerHTML = "Load remote URL";
} else {
Expand Down
2 changes: 1 addition & 1 deletion upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ func Upload(w http.ResponseWriter, r *http.Request) {
switch u.Host {
case "store.tcgplayer.com":
uploadedData, err = loadCollection(gdocURL, maxRows)
case "www.moxfield.com":
case "www.moxfield.com", "moxfield.com":
uploadedData, err = loadMoxfieldDeck(u.Path, maxRows)
case "docs.google.com":
uploadedData, err = loadSpreadsheet(u.Path, maxRows)
Expand Down

0 comments on commit 36d52e6

Please sign in to comment.