From 993d0337a78bd361a3ce89364e811eb4a25c434f Mon Sep 17 00:00:00 2001 From: David Sanders Date: Mon, 5 Dec 2022 10:18:57 -0800 Subject: [PATCH] docs: fix broken links (#36519) * docs: fix broken links * docs: change link to navigator.getUserMedia Co-authored-by: Jeremy Rose * docs: fix link in examples.md Co-authored-by: Jeremy Rose --- docs/api/app.md | 1 - docs/api/dock.md | 2 ++ docs/api/message-port-main.md | 1 + docs/api/parent-port.md | 2 ++ docs/api/structures/desktop-capturer-source.md | 2 +- docs/api/system-preferences.md | 2 +- docs/api/utility-process.md | 1 + docs/api/web-contents.md | 1 + docs/api/web-frame-main.md | 1 + docs/glossary.md | 4 ++-- docs/tutorial/dark-mode.md | 2 +- docs/tutorial/devtools-extension.md | 2 +- docs/tutorial/examples.md | 1 + docs/tutorial/tutorial-6-publishing-updating.md | 2 +- docs/tutorial/updates.md | 2 +- 15 files changed, 17 insertions(+), 9 deletions(-) diff --git a/docs/api/app.md b/docs/api/app.md index 418c3504c3da..4ccd7fde8675 100755 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -1509,7 +1509,6 @@ dock on macOS. A `boolean` property that returns `true` if the app is packaged, `false` otherwise. For many apps, this property can be used to distinguish development and production environments. -[dock-menu]:https://developer.apple.com/macos/human-interface-guidelines/menus/dock-menus/ [tasks]:https://msdn.microsoft.com/en-us/library/windows/desktop/dd378460(v=vs.85).aspx#tasks [app-user-model-id]: https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx [electron-forge]: https://www.electronforge.io/ diff --git a/docs/api/dock.md b/docs/api/dock.md index 3e798e793192..d93f72afe438 100644 --- a/docs/api/dock.md +++ b/docs/api/dock.md @@ -79,3 +79,5 @@ Returns `Menu | null` - The application's [dock menu][dock-menu]. * `image` ([NativeImage](native-image.md) | string) Sets the `image` associated with this dock icon. + +[dock-menu]: https://developer.apple.com/macos/human-interface-guidelines/menus/dock-menus/ diff --git a/docs/api/message-port-main.md b/docs/api/message-port-main.md index 530984391665..371d358f94cb 100644 --- a/docs/api/message-port-main.md +++ b/docs/api/message-port-main.md @@ -56,3 +56,4 @@ Emitted when the remote end of a MessagePortMain object becomes disconnected. [`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort [Channel Messaging API]: https://developer.mozilla.org/en-US/docs/Web/API/Channel_Messaging_API +[event-emitter]: https://nodejs.org/api/events.html#events_class_eventemitter diff --git a/docs/api/parent-port.md b/docs/api/parent-port.md index 9c6ad3a08d65..4b181b474b93 100644 --- a/docs/api/parent-port.md +++ b/docs/api/parent-port.md @@ -44,3 +44,5 @@ event. * `message` any Sends a message from the process to its parent. + +[event-emitter]: https://nodejs.org/api/events.html#events_class_eventemitter diff --git a/docs/api/structures/desktop-capturer-source.md b/docs/api/structures/desktop-capturer-source.md index 1740ee7924f5..e898ebd52362 100644 --- a/docs/api/structures/desktop-capturer-source.md +++ b/docs/api/structures/desktop-capturer-source.md @@ -2,7 +2,7 @@ * `id` string - The identifier of a window or screen that can be used as a `chromeMediaSourceId` constraint when calling - [`navigator.webkitGetUserMedia`]. The format of the identifier will be + [`navigator.getUserMedia`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getUserMedia). The format of the identifier will be `window:XX:YY` or `screen:ZZ:0`. XX is the windowID/handle. YY is 1 for the current process, and 0 for all others. ZZ is a sequential number that represents the screen, and it does not equal to the index in the diff --git a/docs/api/system-preferences.md b/docs/api/system-preferences.md index 6c0a6a388fb4..2c57be770166 100644 --- a/docs/api/system-preferences.md +++ b/docs/api/system-preferences.md @@ -441,7 +441,7 @@ It will always return `granted` for `screen` and for all media types on older ve Returns `Promise` - A promise that resolves with `true` if consent was granted and `false` if it was denied. If an invalid `mediaType` is passed, the promise will be rejected. If an access request was denied and later is changed through the System Preferences pane, a restart of the app will be required for the new permissions to take effect. If access has already been requested and denied, it _must_ be changed through the preference pane; an alert will not pop up and the promise will resolve with the existing access status. -**Important:** In order to properly leverage this API, you [must set](https://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/requesting_authorization_for_media_capture_on_macos?language=objc) the `NSMicrophoneUsageDescription` and `NSCameraUsageDescription` strings in your app's `Info.plist` file. The values for these keys will be used to populate the permission dialogs so that the user will be properly informed as to the purpose of the permission request. See [Electron Application Distribution](../tutorial/application-distribution.md#macos) for more information about how to set these in the context of Electron. +**Important:** In order to properly leverage this API, you [must set](https://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/requesting_authorization_for_media_capture_on_macos?language=objc) the `NSMicrophoneUsageDescription` and `NSCameraUsageDescription` strings in your app's `Info.plist` file. The values for these keys will be used to populate the permission dialogs so that the user will be properly informed as to the purpose of the permission request. See [Electron Application Distribution](../tutorial/application-distribution.md#rebranding-with-downloaded-binaries) for more information about how to set these in the context of Electron. This user consent was not required until macOS 10.14 Mojave, so this method will always return `true` if your system is running 10.13 High Sierra or lower. diff --git a/docs/api/utility-process.md b/docs/api/utility-process.md index 9495b527e730..ed9b44af1ab1 100644 --- a/docs/api/utility-process.md +++ b/docs/api/utility-process.md @@ -135,3 +135,4 @@ Emitted when the child process sends a message using [`process.parentPort.postMe [Services API]: https://chromium.googlesource.com/chromium/src/+/master/docs/mojo_and_services.md [stdio]: https://nodejs.org/dist/latest/docs/api/child_process.html#optionsstdio [event-emitter]: https://nodejs.org/api/events.html#events_class_eventemitter +[`MessagePortMain`]: message-port-main.md diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 811673574bba..1f25e0fb4161 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -2083,3 +2083,4 @@ with open(), or by navigating a link with a target attribute. [event-emitter]: https://nodejs.org/api/events.html#events_class_eventemitter [SCA]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm [`postMessage`]: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage +[`MessagePortMain`]: message-port-main.md diff --git a/docs/api/web-frame-main.md b/docs/api/web-frame-main.md index 3d3b87b35402..34033a85645f 100644 --- a/docs/api/web-frame-main.md +++ b/docs/api/web-frame-main.md @@ -233,3 +233,4 @@ See also how the [Page Visibility API](browser-window.md#page-visibility) is aff [SCA]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm [`postMessage`]: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage +[`MessagePortMain`]: message-port-main.md diff --git a/docs/glossary.md b/docs/glossary.md index 01ba457ff883..020dfbe4552f 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -132,7 +132,7 @@ OSR (offscreen rendering) can be used for loading heavy page in background and then displaying it after (it will be much faster). It allows you to render page without showing it on screen. -For more information, read the [Offscreen Rendering][osr] tutorial. +For more information, read the [Offscreen Rendering] tutorial. ### preload script @@ -235,10 +235,10 @@ embedded content. [mac app store submission guide]: tutorial/mac-app-store-submission-guide.md [main]: #main-process [msi]: https://docs.microsoft.com/en-us/windows/win32/msi/windows-installer-portal +[Native Node Modules]: tutorial/using-native-node-modules.md [offscreen rendering]: tutorial/offscreen-rendering.md [process sandboxing]: tutorial/sandbox.md [renderer]: #renderer-process [userland]: #userland -[using native node modules]: tutorial/using-native-node-modules.md [UtilityProcess]: api/utility-process.md [v8]: #v8 diff --git a/docs/tutorial/dark-mode.md b/docs/tutorial/dark-mode.md index bf16303e4ecb..27fbff07d158 100644 --- a/docs/tutorial/dark-mode.md +++ b/docs/tutorial/dark-mode.md @@ -13,7 +13,7 @@ from the OS. If your app has its own dark mode, you should toggle it on and off in sync with the system's dark mode setting. You can do this by using the -[prefer-color-scheme] CSS media query. +[prefers-color-scheme] CSS media query. ### Manually update your own interfaces diff --git a/docs/tutorial/devtools-extension.md b/docs/tutorial/devtools-extension.md index 8fb5eb059868..0b8d8045f2f2 100644 --- a/docs/tutorial/devtools-extension.md +++ b/docs/tutorial/devtools-extension.md @@ -15,7 +15,7 @@ NPM package that does just that. If you don't want to use the tooling approach, you can also do all of the necessary operations by hand. To load an extension in Electron, you need to download it via Chrome, locate its filesystem path, and then load it into your [Session][session] by calling the -[`ses.loadExtension`] API. +[`ses.loadExtension`][load-extension] API. Using the [React Developer Tools][react-devtools] as an example: diff --git a/docs/tutorial/examples.md b/docs/tutorial/examples.md index b88bbc028b22..c30e0fc7e874 100644 --- a/docs/tutorial/examples.md +++ b/docs/tutorial/examples.md @@ -52,5 +52,6 @@ You can find the full list of "How to?" in the sidebar. If there is something that you would like to do that is not documented, please join our [Discord server][discord] and let us know! +[app]: ../api/app.md [discord]: https://discord.gg/electronjs [fiddle]: https://www.electronjs.org/fiddle diff --git a/docs/tutorial/tutorial-6-publishing-updating.md b/docs/tutorial/tutorial-6-publishing-updating.md index 4adfb434bdb9..a5a67e76834e 100644 --- a/docs/tutorial/tutorial-6-publishing-updating.md +++ b/docs/tutorial/tutorial-6-publishing-updating.md @@ -227,7 +227,7 @@ rest of our docs and happy developing! If you have questions, please stop by our [github actions]: https://github.com/features/actions [github publisher]: https://www.electronforge.io/config/publishers/github [github releases]: https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository -[git tag]: https://git-scm.com/book/en/v2/Git-Basics-Tagging +[git-tag]: https://git-scm.com/book/en/v2/Git-Basics-Tagging [new-pat]: https://github.com/settings/tokens/new [publish command]: https://www.electronforge.io/cli#publish [publisher]: https://www.electronforge.io/config/publishers diff --git a/docs/tutorial/updates.md b/docs/tutorial/updates.md index 530d9658d496..ed7c1d8faf99 100644 --- a/docs/tutorial/updates.md +++ b/docs/tutorial/updates.md @@ -67,7 +67,7 @@ Depending on your needs, you can choose from one of these: to minify server cost. Once you've deployed your update server, you can instrument your app code to receive and -apply the updates with Electron's [autoUpdater] module. +apply the updates with Electron's [autoUpdater](../api/auto-updater.md) module. ### Step 2: Receiving updates in your app