Download tasks/codeql_javascript_benchmark_top30_v1/morefixes-0f4271d4851600835c47/patch.diff from Benchanything/checkerbench: direct link, hf CLI and curl.
- Browser
- Download file 2.47 kB
-
https://huggingface.co/datasets/Benchanything/checkerbench/resolve/main/tasks/codeql_javascript_benchmark_top30_v1/morefixes-0f4271d4851600835c47/patch.diff
- Command line
-
hf download hf://datasets/Benchanything/checkerbench/tasks/codeql_javascript_benchmark_top30_v1/morefixes-0f4271d4851600835c47/patch.diff
-
curl -L -o patch.diff https://huggingface.co/datasets/Benchanything/checkerbench/resolve/main/tasks/codeql_javascript_benchmark_top30_v1/morefixes-0f4271d4851600835c47/patch.diff
2.47 kB
| diff --git a/www/bounce/main.js b/www/bounce/main.js | |
| index e8d658602..ac4a10968 100644 | |
| --- a/www/bounce/main.js | |
| +++ b/www/bounce/main.js | |
| define(['/api/config'], function (ApiConfig) { | |
| window.location.href = target.href; | |
| }; | |
| - // Local URLs don't require any warning and can navigate directly without user input. | |
| - if (target.host === host.host) { return void go(); } | |
| - | |
| - // It's annoying to be prompted that you are leaving the platform to visit its docs | |
| - // but marking the docs domain as trusted undermines third-party admins' autonomy. | |
| - // If we ever abandon the cryptpad.fr domain someone could squat it and abuse this trust. | |
| - // If the docs domain is a subdomain of the current one then redirect automatically. | |
| - // We might make the docs domain configurable at some point in the future. | |
| - if (target.host === 'docs.cryptpad.org' && target.host.endsWith(host.host)) { | |
| - return void go(); | |
| - } | |
| - | |
| - // Everything else requires user input, so we load the platform's translations. | |
| + // Everything else may require user input, so we load the platform's translations. | |
| // FIXME: this seems to infer language preferences from the browser instead of the user's account preferences | |
| + | |
| require([ | |
| '/customize/messages.js', | |
| ], function (Messages) { | |
| define(['/api/config'], function (ApiConfig) { | |
| return void reject(); | |
| } | |
| + // Local URLs don't require any warning and can navigate directly without user input. | |
| + if (target.host === host.host) { return void go(); } | |
| + | |
| + // It's annoying to be prompted that you are leaving the platform to visit its docs | |
| + // but marking the docs domain as trusted undermines third-party admins' autonomy. | |
| + // If we ever abandon the cryptpad.fr domain someone could squat it and abuse this trust. | |
| + // If the docs domain is a subdomain of the current one then redirect automatically. | |
| + // We might make the docs domain configurable at some point in the future. | |
| + if (target.host === 'docs.cryptpad.org' && target.host.endsWith(host.host)) { | |
| + return void go(); | |
| + } | |
| + | |
| // The provided URL will navigate the user away from the outer domain. | |
| var question = Messages._getKey('bounce_confirm', [host.hostname, target.href]); | |
| // Confirm that they want to leave, then navigate or reject based on their choice. | |