From 056c53da68eaa007a7bcabf77ef3205b6ff04ca1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Bollo?= Date: Tue, 9 Jul 2019 17:27:03 +0200 Subject: [PATCH] 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 --- test/AFB.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }; -- 2.16.6