From 753b8145a3cc371d0f8f7deea0a80fc25c45bb25 Mon Sep 17 00:00:00 2001 From: GrahamSH Date: Thu, 18 May 2023 23:41:06 -0400 Subject: [PATCH 1/4] add tip --- content/docs/develop/userscripts/debugging-userscripts.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/content/docs/develop/userscripts/debugging-userscripts.md b/content/docs/develop/userscripts/debugging-userscripts.md index 45e02cb13..84ad36175 100644 --- a/content/docs/develop/userscripts/debugging-userscripts.md +++ b/content/docs/develop/userscripts/debugging-userscripts.md @@ -30,6 +30,11 @@ The `debugger;` keyword in JavaScript will freeze the page when ran, if the deve Enter the addon ID on the "filter" console search bar to only view logs and warnings, as well errors logged with `console.error()`. Keep in mind that this will hide all exceptions, unless you're explicitly logging them in your code. +### Get VSCode Autocomplete on Addon API +Add this snippet before `export async function` to get full autocomplete on the addon object. +```js +/** @typedef {import("../../addon-api/content-script/typedef.js").UserscriptUtilities} UserscriptUtilities @param {UserscriptUtilities} */ +``` ## Edge cases From e0f5bde672e6974031be9b4209bf71fe3124397e Mon Sep 17 00:00:00 2001 From: GrahamSH Date: Wed, 31 May 2023 09:53:28 -0400 Subject: [PATCH 2/4] Update content/docs/develop/userscripts/debugging-userscripts.md Co-authored-by: Hans5958 --- content/docs/develop/userscripts/debugging-userscripts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/develop/userscripts/debugging-userscripts.md b/content/docs/develop/userscripts/debugging-userscripts.md index 84ad36175..e735f1457 100644 --- a/content/docs/develop/userscripts/debugging-userscripts.md +++ b/content/docs/develop/userscripts/debugging-userscripts.md @@ -30,7 +30,7 @@ The `debugger;` keyword in JavaScript will freeze the page when ran, if the deve Enter the addon ID on the "filter" console search bar to only view logs and warnings, as well errors logged with `console.error()`. Keep in mind that this will hide all exceptions, unless you're explicitly logging them in your code. -### Get VSCode Autocomplete on Addon API +### Get VS Code Autocomplete on Addon API Add this snippet before `export async function` to get full autocomplete on the addon object. ```js /** @typedef {import("../../addon-api/content-script/typedef.js").UserscriptUtilities} UserscriptUtilities @param {UserscriptUtilities} */ From 600aed0973853d5d01497bfc50b963f9f53eee11 Mon Sep 17 00:00:00 2001 From: GrahamSH Date: Wed, 7 Jun 2023 20:22:31 -0400 Subject: [PATCH 3/4] Update debugging-userscripts.md --- content/docs/develop/userscripts/debugging-userscripts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/develop/userscripts/debugging-userscripts.md b/content/docs/develop/userscripts/debugging-userscripts.md index e735f1457..3347640cd 100644 --- a/content/docs/develop/userscripts/debugging-userscripts.md +++ b/content/docs/develop/userscripts/debugging-userscripts.md @@ -30,7 +30,7 @@ The `debugger;` keyword in JavaScript will freeze the page when ran, if the deve Enter the addon ID on the "filter" console search bar to only view logs and warnings, as well errors logged with `console.error()`. Keep in mind that this will hide all exceptions, unless you're explicitly logging them in your code. -### Get VS Code Autocomplete on Addon API +### Get VS Code autocomplete on addon API Add this snippet before `export async function` to get full autocomplete on the addon object. ```js /** @typedef {import("../../addon-api/content-script/typedef.js").UserscriptUtilities} UserscriptUtilities @param {UserscriptUtilities} */ From bdb45d9b22edf77d911a638933bbfc603eb70e5a Mon Sep 17 00:00:00 2001 From: GrahamSH Date: Sun, 18 Jun 2023 19:28:07 -0400 Subject: [PATCH 4/4] Update content/docs/develop/userscripts/debugging-userscripts.md --- content/docs/develop/userscripts/debugging-userscripts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/develop/userscripts/debugging-userscripts.md b/content/docs/develop/userscripts/debugging-userscripts.md index 3347640cd..d0e493613 100644 --- a/content/docs/develop/userscripts/debugging-userscripts.md +++ b/content/docs/develop/userscripts/debugging-userscripts.md @@ -30,7 +30,7 @@ The `debugger;` keyword in JavaScript will freeze the page when ran, if the deve Enter the addon ID on the "filter" console search bar to only view logs and warnings, as well errors logged with `console.error()`. Keep in mind that this will hide all exceptions, unless you're explicitly logging them in your code. -### Get VS Code autocomplete on addon API +### Get VS Code autocomplete on Addon API Add this snippet before `export async function` to get full autocomplete on the addon object. ```js /** @typedef {import("../../addon-api/content-script/typedef.js").UserscriptUtilities} UserscriptUtilities @param {UserscriptUtilities} */