docs: remove duplicate fiddles (#39419)

This commit is contained in:
Milan Burda 2023-08-10 10:52:52 +02:00 committed by GitHub
parent 0f49868234
commit c4d417b6f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 0 additions and 181 deletions

View file

@ -1,22 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div>
<h3>Basic notification</h3>
<em>Supports: Win 7+, macOS, Linux (that supports libnotify)<span>|</span> Process: Renderer</em>
<div>
<div>
<button id="basic-noti">View demo</button>
</div>
<p>This demo demonstrates a basic notification. Text only.</p>
</div>
</div>
<script>
// You can also require other files to run in this process
require('./renderer.js')
</script>
</body>
</html>

View file

@ -1,26 +0,0 @@
const { BrowserWindow, app } = require('electron')
let mainWindow = null
function createWindow () {
const windowOptions = {
width: 600,
height: 300,
title: 'Basic Notification',
webPreferences: {
contextIsolation: false,
nodeIntegration: true
}
}
mainWindow = new BrowserWindow(windowOptions)
mainWindow.loadFile('index.html')
mainWindow.on('closed', () => {
mainWindow = null
})
}
app.whenReady().then(() => {
createWindow()
})

View file

@ -1,14 +0,0 @@
const notification = {
title: 'Basic Notification',
body: 'Short message part'
}
const notificationButton = document.getElementById('basic-noti')
notificationButton.addEventListener('click', () => {
const myNotification = new window.Notification(notification.title, notification)
myNotification.onclick = () => {
console.log('Notification clicked')
}
})

View file

@ -1,22 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div>
<h3>Notification with image</h3>
<i>Supports: Win 7+, macOS, Linux (that supports libnotify)<span>|</span> Process: Renderer</i>
<div>
<div>
<button id="advanced-noti">View demo</button>
</div>
<p>This demo demonstrates an advanced notification. Both text and image.</p>
</div>
</div>
<script>
// You can also require other files to run in this process
require('./renderer.js')
</script>
</body>
</html>

View file

@ -1,26 +0,0 @@
const { BrowserWindow, app } = require('electron')
let mainWindow = null
function createWindow () {
const windowOptions = {
width: 600,
height: 300,
title: 'Advanced Notification',
webPreferences: {
contextIsolation: false,
nodeIntegration: true
}
}
mainWindow = new BrowserWindow(windowOptions)
mainWindow.loadFile('index.html')
mainWindow.on('closed', () => {
mainWindow = null
})
}
app.whenReady().then(() => {
createWindow()
})

View file

@ -1,14 +0,0 @@
const notification = {
title: 'Notification with image',
body: 'Short message plus a custom image',
icon: 'https://raw.githubusercontent.com/electron/electron-api-demos/v2.0.2/assets/img/programming.png'
}
const notificationButton = document.getElementById('advanced-noti')
notificationButton.addEventListener('click', () => {
const myNotification = new window.Notification(notification.title, notification)
myNotification.onclick = () => {
console.log('Notification clicked')
}
})