Browse Source

docs: remove duplicate fiddles (#39419)

Milan Burda 1 year ago
parent
commit
c4d417b6f6

+ 0 - 22
docs/fiddles/native-ui/notifications/basic-notification/index.html

@@ -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>

+ 0 - 26
docs/fiddles/native-ui/notifications/basic-notification/main.js

@@ -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()
-})

+ 0 - 14
docs/fiddles/native-ui/notifications/basic-notification/renderer.js

@@ -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')
-  }
-})

+ 0 - 22
docs/fiddles/native-ui/notifications/notification-with-image/index.html

@@ -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>

+ 0 - 26
docs/fiddles/native-ui/notifications/notification-with-image/main.js

@@ -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()
-})

+ 0 - 14
docs/fiddles/native-ui/notifications/notification-with-image/renderer.js

@@ -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')
-  }
-})

+ 0 - 26
docs/fiddles/windows/manage-windows/create-frameless-window/index.html

@@ -1,26 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <meta charset="UTF-8">
-  </head>
-  <body>
-    <div>
-      <div>
-        <h1>Create a frameless window</h1>
-        <em>Supports: Win, macOS, Linux <span>|</span> Process: Main</em>
-        <div>
-          <p>A frameless window is a window that has no <i>"chrome"</i>,
-            such as toolbars, title bars, status bars, borders, etc. You can make
-            a browser window frameless by setting
-            <code>frame</code> to <code>false</code> when creating the window.</p>
-          <div>
-            <button id="frameless-window">View Demo</button>
-          </div>
-        </div>
-      </div>
-    </div>
-  </body>
-  <script>
-    require('./renderer.js')
-  </script>
-</html>

+ 0 - 23
docs/fiddles/windows/manage-windows/create-frameless-window/main.js

@@ -1,23 +0,0 @@
-const { app, BrowserWindow, ipcMain } = require('electron')
-
-ipcMain.on('create-frameless-window', (event, { url }) => {
-  const win = new BrowserWindow({ frame: false })
-  win.loadURL(url)
-})
-
-function createWindow () {
-  const mainWindow = new BrowserWindow({
-    width: 600,
-    height: 400,
-    title: 'Create a frameless window',
-    webPreferences: {
-      contextIsolation: false,
-      nodeIntegration: true
-    }
-  })
-  mainWindow.loadFile('index.html')
-}
-
-app.whenReady().then(() => {
-  createWindow()
-})

+ 0 - 8
docs/fiddles/windows/manage-windows/create-frameless-window/renderer.js

@@ -1,8 +0,0 @@
-const { ipcRenderer } = require('electron')
-
-const newWindowBtn = document.getElementById('frameless-window')
-
-newWindowBtn.addEventListener('click', () => {
-  const url = 'data:text/html,<h2>Hello World!</h2><a id="close" href="javascript:window.close()">Close this Window</a>'
-  ipcRenderer.send('create-frameless-window', { url })
-})