File size: 584 Bytes
7e173d8
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
// SPDX-License-Identifier: MIT
// drAIML WebGPU helper · on drAIML's pages only. Tells the page the helper is installed (so its donation panel can offer
// "check my graphics card"), and opens the check when the page asks. It reads nothing from the page.
const api = typeof browser !== "undefined" ? browser : chrome;
document.documentElement.dataset.webgpuHelper = api.runtime.getManifest().version;
window.addEventListener("message", (e) => {
  if (e.source === window && e.data && e.data.type === "draiml-webgpu-helper:open") api.runtime.sendMessage({ type: "open-check" });
});