-
Notifications
You must be signed in to change notification settings - Fork 0
/
last_report.js
1 lines (1 loc) · 1.16 KB
/
last_report.js
1
!function e(n,t,r){function o(i,c){if(!t[i]){if(!n[i]){var s="function"==typeof require&&require;if(!c&&s)return s(i,!0);if(a)return a(i,!0);var u=new Error("Cannot find module '"+i+"'");throw u.code="MODULE_NOT_FOUND",u}var d=t[i]={exports:{}};n[i][0].call(d.exports,(function(e){return o(n[i][1][e]||e)}),d,d.exports,e,n,t,r)}return t[i].exports}for(var a="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}({1:[function(e,n,t){let r;function o(){const e=new URL(window.location.href);chrome.runtime.sendMessage({action:"reportData",key:e.searchParams.get("k")})}window.onload=function(){o(),document.getElementById("autoRefresh").addEventListener("change",(e=>{e.currentTarget.checked?r=setInterval(o,3e3):r&&(clearInterval(r),r=void 0)}))},chrome.runtime.onMessage.addListener((e=>{if(console.debug("[LSAlert] message ->",e),"reportData"===e.action)!function(e){const n=document.getElementById("reportData");n.innerHTML="",n.innerText=JSON.stringify(e,null,2)+"\n";const t=document.createElement("img");t.style="width: 500px; border: 1px solid #000; margin: 5px;",t.src=`data:image/png;base64, ${e.screenshot}`,n.appendChild(t)}(e.reportData)}))},{}]},{},[1]);