mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-03-03 19:25:47 +03:00
Use the fragment for the URL
This commit is contained in:
parent
219005952a
commit
3755850c2e
|
@ -32,7 +32,7 @@ add "&raw" to the end of the URL within a browser.
|
||||||
|
|
||||||
// Collect the URL parameters
|
// Collect the URL parameters
|
||||||
var parameters = {};
|
var parameters = {};
|
||||||
window.location.search.substr(1).split('&').forEach(function (entry) {
|
window.location.hash.substr(1).split('&').forEach(function (entry) {
|
||||||
var eq = entry.indexOf('=');
|
var eq = entry.indexOf('=');
|
||||||
if (eq >= 0) {
|
if (eq >= 0) {
|
||||||
parameters[decodeURIComponent(entry.slice(0, eq))] =
|
parameters[decodeURIComponent(entry.slice(0, eq))] =
|
||||||
|
@ -41,7 +41,7 @@ add "&raw" to the end of the URL within a browser.
|
||||||
});
|
});
|
||||||
// Produce a Location query string from a parameter object.
|
// Produce a Location query string from a parameter object.
|
||||||
function locationQuery(params) {
|
function locationQuery(params) {
|
||||||
return '?' + Object.keys(params).map(function (key) {
|
return '#' + Object.keys(params).map(function (key) {
|
||||||
return encodeURIComponent(key) + '=' +
|
return encodeURIComponent(key) + '=' +
|
||||||
encodeURIComponent(params[key]);
|
encodeURIComponent(params[key]);
|
||||||
}).join('&');
|
}).join('&');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user