Sentry/preload.js

13 lines
407 B
JavaScript
Raw Permalink Normal View History

2022-08-23 19:16:49 -04:00
const appInfo = require('./package.json');
2022-05-25 14:28:19 -04:00
// All of the Node.js APIs are available in the preload process.
// It has the same sandbox as a Chrome extension.
window.addEventListener('DOMContentLoaded', () => {
const replaceText = (selector, text) => {
const element = document.getElementById(selector)
if (element) element.innerText = text
}
2022-08-23 19:16:49 -04:00
replaceText('app-version', appInfo.version);
});