summaryrefslogtreecommitdiff
path: root/read.html
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-11-23 18:03:59 +0300
committerAndrew Dolgov <[email protected]>2018-11-23 18:03:59 +0300
commite906fd5d3ac3085e54a5f82abdd83430f741239c (patch)
tree33af686cc2d82acccca6eb02db968fe66669a478 /read.html
parentf45af4fb5c81737af671a2665f6c997e827f617b (diff)
iframe: lookup injected resources by canonical name, without ts=
Diffstat (limited to 'read.html')
-rw-r--r--read.html13
1 files changed, 10 insertions, 3 deletions
diff --git a/read.html b/read.html
index 2dc1793..909359d 100644
--- a/read.html
+++ b/read.html
@@ -275,9 +275,16 @@
for (var i = 0; i < res_names.length; i++) {
fetch(res_names[i], {credentials: 'same-origin'}).then(function(resp) {
- if (resp.status == 200) resp.text().then(function(data) {
- _res_data[resp.url] = data;
- });
+ if (resp.status == 200) {
+ resp.text().then(function(data) {
+ var url = new URL(resp.url);
+ url.searchParams.delete("ts");
+
+ _res_data[url.toString()] = data;
+ })
+ } else {
+ console.warn('loader failed for resource', res_names[i], resp);
+ }
});
}