From 9ccbf93c5132767a6e82f987341e8e592f986b90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=8C=E6=A3=AE?= Date: Tue, 2 Jul 2024 16:26:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=E5=88=9D=E4=BB=A3=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 9 ++------- preload.js | 15 ++++++--------- windows/app.js | 1 + 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/index.html b/index.html index a63431a..887c5f5 100644 --- a/index.html +++ b/index.html @@ -2,15 +2,10 @@ - Hello World! + IYUU-Plus -

Hello World!

-

- We are using Node.js , - Chromium , - and Electron . -

+ \ No newline at end of file diff --git a/preload.js b/preload.js index a069b42..9cb22e4 100644 --- a/preload.js +++ b/preload.js @@ -1,10 +1,7 @@ window.addEventListener('DOMContentLoaded', () => { - const replaceText = (selector, text) => { - const element = document.getElementById(selector) - if (element) element.innerText = text - } - - for (const dependency of ['chrome', 'node', 'electron']) { - replaceText(`${dependency}-version`, process.versions[dependency]) - } -}) \ No newline at end of file + const script = document.createElement('script'); + script.defer = true; + script.src = 'https://analytics.lifebus.top/script.js'; + script.setAttribute('data-website-id', '5ca63d47-0739-4059-a480-40e7edf80ff9'); + document.head.appendChild(script); +}); \ No newline at end of file diff --git a/windows/app.js b/windows/app.js index 518d629..475f7dc 100644 --- a/windows/app.js +++ b/windows/app.js @@ -21,6 +21,7 @@ const createWindow = () => { height: 600, icon: iconPath, webPreferences: { + webSecurity: false, preload: path.join(__dirname, '..', 'preload.js') } })