blob: f634f68bb79480502668a94832bfb3781309accd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<!DOCTYPE html>
<script>
var width, url;
function maybeReport() {
if (width !== undefined && url !== undefined) {
window.parent.postMessage({status: "result",
width,
url}, "*");
}
}
onload = function() {
width = document.querySelector("img").width;
maybeReport();
};
navigator.serviceWorker.onmessage = function(event) {
url = event.data;
maybeReport();
};
</script>
<img src="image-20px.png">
|