From: José Bollo Date: Tue, 9 Jul 2019 15:27:03 +0000 (+0200) Subject: AFB.js: Improve default token discovery X-Git-Tag: 8.99.1~19 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fapp-framework-binder.git;a=commitdiff_plain;h=056c53da68eaa007a7bcabf77ef3205b6ff04ca1 AFB.js: Improve default token discovery The example script AFB.js should look int the URLs of the page if the token is set or not and then use it. Bug-AGL: SPEC-2661 Signed-off-by: Jose Bollo Change-Id: I4adba8eac214130b425b6cd3c56fc1dc63543011 --- diff --git a/test/AFB.js b/test/AFB.js index 65648437..4c500b99 100644 --- a/test/AFB.js +++ b/test/AFB.js @@ -21,7 +21,7 @@ if (typeof base != "object") var initial = { base: base.base || "api", - token: base.token || initialtoken || "HELLO", + token: initialtoken || base.token || URLSearchParams(window.location.search).get('token') || "HELLO", host: base.host || window.location.host, url: base.url || undefined };