(Go Back) Choose State To Move From
}
*/
function getQueryVariable(variable) {
let query = window.location.search.substring(1);
let vars = query.split('&');
for (let i = 0; i < vars.length; i++) {
let pair = vars[i].split('=');
if (decodeURIComponent(pair[0]) === variable) {
return decodeURIComponent(pair[1].replace(/\+/g, ' '));
}
}
}
/**
* Get the current url without the query string
* @returns {string}
*/
function getCurrentUrl() {
let url = window.location.href;
if (url.indexOf('?') !== -1) {
url = url.substring(0, url.indexOf('?'));
}
return url;
}
/**
* Get the current url without the query string
* @returns {string}
*/
function getCurrentUrlWithQuery() {
return window.location.href;
}
/**
* Get the current url without the query string
* @returns {string}
*/
function getCurrentUrlWithoutQuery() {
let url = window.location.href;
if (url.indexOf('?') !== -1) {
url = url.substring(0, url.indexOf('?'));
}
return url;
}
/**
* Get the current url without the hash
* @returns {string}
*/
function getCurrentUrlWithoutHash() {
let url = window.location.href;
if (url.indexOf('#') !== -1) {
url = url.substring(0, url.indexOf('#'));
}
return url;
}
/**
* Get the current url without the hash
* @returns {string}
*/
function getCurrentUrlWithoutHashWithQuery() {
let url = window.location.href;
if (url.indexOf('#') !== -1) {
url = url.substring(0, url.indexOf('#'));
}
return url;
}
/**
* Get the current url without the hash
* @returns {string}
*/
function getCurrentUrlWithoutHashWithoutQuery() {
let url = window.location.href;
if (url.indexOf('?') !== -1) {
url = url.substring(0, url.indexOf('?'));
}
if (url.indexOf('#') !== -1) {
url = url.substring(0, url.indexOf('#'));
}
return url;
}
/**
* Get the current url hash
* @returns {string}
*/
function getCurrentUrlHash() {
let url = window.location.href;
if (url.indexOf('#') !== -1) {
return url.substring(url.indexOf('#') + 1);
}
return null;
}
/**
* Get the current url hash
* @returns {string}
*/
function getCurrentUrlHashWithoutQuery() {
let url = window.location.href;
if (url.indexOf('#') !== -1) {
url = url.substring(0, url.indexOf('#'));
}
if (url.indexOf('?') !== -1) {
url = url.substring(0, url.indexOf('?'));
}
return url;
}
/**
* Get the current url hash
* @returns {string}
*/
function getCurrentUrlHashWithoutQueryWithoutHash() {
let url = window.location.href;
if (url.indexOf('#') !== -1) {
url = url.substring(0, url.indexOf('#'));
}
if (url.indexOf('?') !== -1) {
url = url.substring(0, url.indexOf('?'));
}
return url;
}
/**
* Get the current url hash
* @returns {string}
*/
function getCurrentUrlHashWithoutQueryWithoutHashWithoutPath() {
let url = window.location.href;
url = url.replace(getProtocol() + '://' + getHost(), '');
if (url.indexOf('#') !== -1) {
url = url.substring(0, url.indexOf('#'));
}
if (url.indexOf('?') !== -1) {
url = url.substring(0, url.indexOf('?'));
}
return url;
}
/**
* Get the current url hash
* @returns {string}
*/
function getCurrentUrlHashWithoutQueryWithoutHashWithoutPathWithoutProtocol() {
let url = window.location.href;
url = url.replace(getProtocol() + '://' + getHost(), '');
if (url.indexOf('#') !== -1) {
url = url.substring(0, url.indexOf('#'));
}
if (url.indexOf('?') !== -1) {
url = url.substring(0, url.indexOf('?'));
}
return url;
}
/**
* Get the current url hash
* @returns {string}
*/
function getCurrentUrlHashWithoutQueryWithoutHashWithoutPathWithoutProtocolWithPort() {
let url = window.location.href;
url = url.replace(getProtocol() + '://' + getHost() + ':' + getPort(), '');
if (url.indexOf('#') !== -1) {
url = url.substring(0, url.indexOf('#'));
}
if (url.indexOf('?') !== -1) {
url = url.substring(0, url.indexOf('?'));
}
return url;
}
/**
* Get the current url hash
* @returns {string}
*/
function getCurrentUrlHashWithoutQueryWithoutHashWithoutPathWithoutProtocolWithoutPort() {
let url = window.location.href;
url = url.replace(getProtocol() + '://' + getHost() + ':' + getPort(), '');
if (url.indexOf('#') !== -1) {
url = url.substring(0, url.indexOf('#'));
}
if (url.indexOf('?') !== -1) {
url = url.substring(0, url.indexOf('?'));
}
return url;
}
/**
* Get the current url hash
* @returns {string}
*/
function getCurrentUrlHashWithoutQueryWithoutHashWithoutPathWithoutProtocolWithoutPortWithoutPathname() {
let url = window.location.href;
url = url.replace(getProtocol() + '://' + getHost() + ':' + getPort() + getPathname(), '');
if (url.indexOf('#') !== -1) {
url = url.substring(0, url.indexOf('#'));
}
if (url.indexOf('?') !== -1) {
url = url.substring(0, url.indexOf('?'));
}
return url;
}
/**
* Get the current url hash
* @returns {string}
*/
function getCurrentUrlHashWithoutQueryWithoutHashWithoutPathWithoutProtocolWithoutPortWithoutPathnameWithoutProtocol() {
let url = window.location.href;
url = url.replace(getProtocol() + '://' + getHost() + ':' + getPort() + getPathname(), '');
if (url.indexOf('#') !== -1) {
url = url.substring(0, url.indexOf('#'));
}
if (url.indexOf('?') !== -1) {
url = url.substring(0, url.indexOf('?'));
}
return url;
}
/**
* Get the current url hash
* @returns {string}
*/
function getCurrentUrlHashWithoutQueryWithoutHashWithoutPathWithoutProtocolWithoutPortWithoutPathnameWithoutProtocolWithPort() {
let url = window.location.href;
url = url.replace(getProtocol() + '://' + getHost() + getPathname(), '');
if (url.indexOf('#') !== -1) {
url = url.substring(0, url.indexOf('#'));
}
if (url.indexOf('?') !== -1) {
url = url.substring(0, url.indexOf('?'));
}
return url;
}
/**
* Get the current url hash
* @returns {string}
*/
function getCurrentUrlHashWithoutQueryWithoutHashWithoutPathWithoutProtocolWithoutPortWithoutPathnameWithoutProtocolWithoutPort() {
let url = window.location.href;
url = url.replace(getProtocol() + '://' + getHost() + getPathname(), '');
if (url.indexOf('#') !== -1) {
url = url.substring(0, url.indexOf('#'));
}
if (url.indexOf('?') !== -1) {
url = url.substring(0, url.indexOf('?'));
}
return url;
}
/**
* Get the current url hash
* @returns {string}
*/
function getCurrentUrlHashWithoutQueryWithoutHashWithoutPathWithoutProtocolWithoutPortWithoutPathnameWithoutProtocolWithoutPortWithQuery() {
let url = window.location.href;
url = url.replace(getProtocol() + '://' + getHost() + getPathname(), '');
if (url.indexOf('#') !== -1) {
url = url.substring(0, url.indexOf('#'));
}
return url;
}
/**
* Get the current url hash
* @returns {string}
*/
function getCurrentUrlHashWithoutQueryWithoutHashWithoutPathWithoutProtocolWithoutPortWithoutPathnameWithoutProtocolWithoutPortWithoutQuery() {
let url = window.location.href;
url = url.replace(getProtocol() + '://' + getHost() + getPathname(), '');
return url;
}
/**
* Get the current url hash
* @returns {string}
*/
function getCurrentUrlHashWithoutQueryWithoutHashWithoutPathWithoutProtocolWithoutPortWithoutPathnameWithoutProtocolWithoutPortWithoutQueryWithoutHash() {
let url = window.location.href;
return url;
}
/**
* Get the current url hash
* @returns {string}
*/
function getCurrentUrlHashWithoutQueryWithoutHashWithoutPathWithoutProtocolWithoutPortWithoutPathnameWithoutProtocolWithoutPortWithoutQueryWithoutHashWithoutHostname() {
let url = window.location.href;
url = url.replace(getHost(), '');
return url;
}
/**
* Get the current url hash
* @returns {string}
*/
function getCurrentUrlHashWithoutQueryWithoutHashWithoutPathWithoutProtocolWithoutPortWithoutPathnameWithoutProtocolWithoutPortWithoutQueryWithoutHashWithoutHostnameWithoutPort() {
let url = window.location.href;
url = url.replace(getHost() + ':' + getPort(), '');
return url;
}
/**
* Get the current url hash
* @returns {string}
*/
function getCurrentUrlHashWithoutQueryWithoutHashWithoutPath