Skip to content

Commit

Permalink
Accept files with .xml extension
Browse files Browse the repository at this point in the history
  • Loading branch information
imdj committed Aug 17, 2024
1 parent 5ebfcef commit 6b49e54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/InitialView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
</svg>
<span>Upload an OPML file or <button class="text-sky-500 hover:text-sky-700 pointer-events-auto" onclick={() => opml.createBasic()}>Create a new one</button></span>
</label>
<input type="file" accept=".opml" onchange={readFile} class="opacity-0 w-full h-full cursor-pointer"/>
<input type="file" accept=".opml,.xml" onchange={readFile} class="opacity-0 w-full h-full cursor-pointer"/>
</div>
4 changes: 2 additions & 2 deletions src/lib/components/ToolBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
function openFile() {
const input = document.createElement("input");
input.type = "file";
input.accept = ".opml";
input.accept = ".opml,.xml";
input.onchange = function(event) {
const file = event.target.files[0];
if (file) {
Expand All @@ -111,7 +111,7 @@
function mergeFile() {
const input = document.createElement("input");
input.type = "file";
input.accept = ".opml";
input.accept = ".opml,.xml";
input.onchange = function(event) {
const file = event.target.files[0];
if (file) {
Expand Down

0 comments on commit 6b49e54

Please sign in to comment.