Fix chooseTryjobsCallback and remove args from filterExperimentsCallback

"Choosing tryjobs" button currently schedules runs with encoded project
URLs. For example, a depot_tools tryjob should have the project field
chromium/tools/depot_tools but this becomes chromimum%2Ftools%2Fdepot_tools
and causes the run to fail.

Instead, only the project URL should be encoded for fetching the plugin
config and not for scheduling builds.

This change also removes unneeded arguments to filterExperimentsCallback.

Bug: 1203391, 1174869
Change-Id: I0d39aefdff095bb3990f068a5a4033ad02d756bb
Reviewed-on: https://chromium-review.googlesource.com/c/infra/gerrit-plugins/buildbucket/+/2855011
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
diff --git a/src/main/resources/static/checks-fetcher.js b/src/main/resources/static/checks-fetcher.js
index 3a2840b..a21fd21 100644
--- a/src/main/resources/static/checks-fetcher.js
+++ b/src/main/resources/static/checks-fetcher.js
@@ -822,12 +822,11 @@
    * Top-Level ActionCallback that opens the tryjob picker popup.
    */
   async chooseTryjobsCallback(change, patchset, project) {
-    const projectURI = encodeURIComponent(project);
     const pluginName = encodeURIComponent(this.plugin.getPluginName());
     const config = await this.plugin.restApi()
-        .get(`/projects/${projectURI}/${pluginName}~config`);
-    await openTryjobPicker(this.plugin, config, this.buildbucketHost,
-        projectURI, change, patchset);
+        .get(`/projects/${encodeURIComponent(project)}/${pluginName}~config`);
+    await openTryjobPicker(this.plugin, config, this.buildbucketHost, project,
+        change, patchset);
     this.plugin.checks().announceUpdate();
     return {};
   }
@@ -836,8 +835,7 @@
    * Top-Level ActionCallback that toggles the display and fetching of
    * experimental builds, CheckRuns, and CheckResults.
    */
-  async filterExperimentsCallback(
-      change, patchset, attempt, externalId, checkName, actionName) {
+  async filterExperimentsCallback() {
     this.includeExperiments = !this.includeExperiments;
     this.plugin.checks().announceUpdate();
     return {};