MCPcopy Create free account
hub / github.com/adobe/Marinus / login_qs

Function login_qs

web_server/public/javascripts/login.js:23–31  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

21}
22
23function login_qs(key) {
24 /* eslint-disable-next-line no-useless-escape */
25 key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, "\\$&"); // escape RegEx meta chars
26 var match = location.search.match(new RegExp("[?&]" + key + "=([^&]+)(&|$)"));
27 if (match == null) {
28 return ("/");
29 }
30 return match && decodeURIComponent(match[1].replace(/\+/g, " "));
31}
32
33function doLogin() {
34 window.document.location = "/auth/login?returnPath=" + login_qs("returnPath");

Callers 1

doLoginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected