Skip to content

Add runtime code comment to indicate where to raise issues #388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/features/runtime-checks/script-overload.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ export function wrapScriptCodeOverload (code, config) {
});
`
return removeIndent(`(function (parentScope) {
/**
* DuckDuckGo Runtime Checks injected code.
* If you're reading this, you're probably trying to debug a site that is breaking due to our runtime checks.
* Please raise an issues on our GitHub repo: https://github.com/duckduckgo/content-scope-scripts/
*/
${constructProxy.toString()}
${prepend}
${code}
Expand Down
5 changes: 5 additions & 0 deletions unit-test/script-overload-snapshots/out/1.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
(function (parentScope) {
/**
* DuckDuckGo Runtime Checks injected code.
* If you're reading this, you're probably trying to debug a site that is breaking due to our runtime checks.
* Please raise an issues on our GitHub repo: https://github.com/duckduckgo/content-scope-scripts/
*/
function constructProxy (scope, outputs) {
if (Object.is(scope)) {
// Should not happen, but just in case fail safely
Expand Down
5 changes: 5 additions & 0 deletions unit-test/script-overload-snapshots/out/2.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
(function (parentScope) {
/**
* DuckDuckGo Runtime Checks injected code.
* If you're reading this, you're probably trying to debug a site that is breaking due to our runtime checks.
* Please raise an issues on our GitHub repo: https://github.com/duckduckgo/content-scope-scripts/
*/
function constructProxy (scope, outputs) {
if (Object.is(scope)) {
// Should not happen, but just in case fail safely
Expand Down
5 changes: 5 additions & 0 deletions unit-test/script-overload-snapshots/out/3.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
(function (parentScope) {
/**
* DuckDuckGo Runtime Checks injected code.
* If you're reading this, you're probably trying to debug a site that is breaking due to our runtime checks.
* Please raise an issues on our GitHub repo: https://github.com/duckduckgo/content-scope-scripts/
*/
function constructProxy (scope, outputs) {
if (Object.is(scope)) {
// Should not happen, but just in case fail safely
Expand Down