AFB.js: Improve default token discovery
[src/app-framework-binder.git] / test / AFB.js
index 6564843..4c500b9 100644 (file)
@@ -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
 };