mirror of
https://github.com/electron/electron.git
synced 2026-10-28 11:44:46 +08:00
lint-roller 4 drops `lint-roller-markdown-standard` (and with it the
transitive eslint/standard dependency tree, roughly 1,900 lines of
yarn.lock) in favour of `lint-roller-markdown-oxlint`, which lints the JS
code blocks in docs/ with the repo's own oxlint and .oxlintrc.json. It
also makes `lint-roller-markdown-ts-check` work with TypeScript 6 and 7.
- `lint:js-in-markdown` now runs `lint-roller-markdown-oxlint`.
- `lint:docs-fiddles` ran the `standard` binary, which was only ever
installed as a dependency of lint-roller 3, so it now runs oxlint over
docs/fiddles instead. The dozen findings that surfaced (unused trailing
callback parameters, one `require('path')`, one stale eslint-disable
comment) are fixed in the fiddles, and the one tutorial that inlines an
affected fiddle is kept in sync.
- The `<!-- eslint-... -->` HTML comments in docs were directives for
lint-roller-markdown-standard and are removed, and the docs style guide
no longer points at standard-markdown.
Co-authored-by: Claude <noreply@anthropic.com>
26 lines
808 B
JavaScript
26 lines
808 B
JavaScript
const listenToWindowBtn = document.getElementById('listen-to-window')
|
|
const focusModalBtn = document.getElementById('focus-on-modal-window')
|
|
|
|
const hideFocusBtn = () => {
|
|
focusModalBtn.classList.add('disappear')
|
|
focusModalBtn.classList.remove('smooth-appear')
|
|
focusModalBtn.removeEventListener('click', focusWindow)
|
|
}
|
|
|
|
const showFocusBtn = () => {
|
|
focusModalBtn.classList.add('smooth-appear')
|
|
focusModalBtn.classList.remove('disappear')
|
|
focusModalBtn.addEventListener('click', focusWindow)
|
|
}
|
|
const focusWindow = () => {
|
|
window.electronAPI.focusDemoWindow()
|
|
}
|
|
|
|
window.electronAPI.onWindowFocus(hideFocusBtn)
|
|
window.electronAPI.onWindowClose(hideFocusBtn)
|
|
window.electronAPI.onWindowBlur(showFocusBtn)
|
|
|
|
listenToWindowBtn.addEventListener('click', () => {
|
|
window.electronAPI.showDemoWindow()
|
|
})
|