Skip to content

Commit ef833f2

Browse files
Add runtime code comment to indicate where to raise issues
1 parent dd1f8dd commit ef833f2

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

src/features/runtime-checks/script-overload.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ export function wrapScriptCodeOverload (code, config) {
155155
});
156156
`
157157
return removeIndent(`(function (parentScope) {
158+
/**
159+
* DuckDuckGo Runtime Checks injected code.
160+
* If you're reading this, you're probably trying to debug a site that is breaking due to our runtime checks.
161+
* Please raise an issues on our GitHub repo: https://github.com/duckduckgo/content-scope-scripts/
162+
*/
158163
${constructProxy.toString()}
159164
${prepend}
160165
${code}

unit-test/script-overload-snapshots/out/1.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
(function (parentScope) {
2+
/**
3+
* DuckDuckGo Runtime Checks injected code.
4+
* If you're reading this, you're probably trying to debug a site that is breaking due to our runtime checks.
5+
* Please raise an issues on our GitHub repo: https://github.com/duckduckgo/content-scope-scripts/
6+
*/
27
function constructProxy (scope, outputs) {
38
if (Object.is(scope)) {
49
// Should not happen, but just in case fail safely

unit-test/script-overload-snapshots/out/2.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
(function (parentScope) {
2+
/**
3+
* DuckDuckGo Runtime Checks injected code.
4+
* If you're reading this, you're probably trying to debug a site that is breaking due to our runtime checks.
5+
* Please raise an issues on our GitHub repo: https://github.com/duckduckgo/content-scope-scripts/
6+
*/
27
function constructProxy (scope, outputs) {
38
if (Object.is(scope)) {
49
// Should not happen, but just in case fail safely

0 commit comments

Comments
 (0)