refactor: simplified a regex in home.js

master^2
Bobby Wibowo 2 years ago
parent 5a74776978
commit 274d922b2f
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF
  1. 2
      src/js/home.js

@ -688,7 +688,7 @@ page.updateTemplate = (file, response) => {
link.classList.remove('is-hidden')
clipboard.parentElement.classList.remove('is-hidden')
const exec = /.[\w]+(\?|$)/.exec(response.url)
const exec = /.[\w]+$/.exec(response.url)
const extname = exec && exec[0]
? exec[0].toLowerCase()
: null

Loading…
Cancel
Save