url search: default to all urls instead of html only filter

wabac.js rewriting improvements: more careful 'this' rewriting in js
bump to 1.2.0-beta.2
This commit is contained in:
Ilya Kreymer
2020-10-22 14:49:20 -07:00
parent 15ee50e793
commit fa6e94bd52
5 changed files with 33 additions and 46 deletions
+3 -16
View File
@@ -13,7 +13,7 @@ class URLResources extends LitElement
{
static get filters() {
return [
{name: "HTML", filter: ""}, //default
{name: "HTML", filter: "text/html,text/xhtml"},
{name: "Images", filter: "image/"},
{name: "Audio/Video", filter: "audio/,video/"},
{name: "PDF", filter: "application/pdf"},
@@ -23,7 +23,7 @@ class URLResources extends LitElement
{name: "Plain Text", filter: "text/plain"},
{name: "JSON", filter: "application/json"},
{name: "DASH/HLS", filter: "application/dash+xml,application/x-mpegURL,application/vnd.apple.mpegurl"},
{name: "All URLs", filter: "all"}
{name: "All URLs", filter: ""}
];
}
@@ -140,20 +140,7 @@ class URLResources extends LitElement
url = "https://" + url;
}
let mime;
switch (this.currMime) {
case "all":
mime = "";
break;
case "":
mime = "text/html,text/xhtml";
break;
default:
mime = this.currMime;
}
const mime = this.currMime;
const params = new URLSearchParams({
mime,