/* Get current page canonical url
175627
function getCanonicalUrl() {
  let link;
  if (window.self !== window.top) {
    try {
      link = window.top.document.head.querySelector('link[rel="canonical"][href]');
    } catch (e) { }
  } else {
    link = document.head.querySelector('link[rel="canonical"][href]');
  }

  if (link) {
    return link.href;
  }
  return '';
}
1360954
def get_current_url(self):
		'''
		

		'''
		res = self.Page_getNavigationHistory()
		assert 'result' in res
		assert 'currentIndex' in res['result']
		assert 'entries' in res['result']

		return res['result']['entries'][res['result']['currentIndex']]['url']
972004
function getPage( i ) {
		options.path = urlpath({
			'pathname': opts.pathname,
			'page': i,
			'per_page': opts.per_page,
			'query': opts.query
		});
		debug( 'Request path: %s', options.path );

		debug( 'Attempting to resolve page %d.', i );
		request( options, onPage );
	}
676079
public function getCurrentUrl()
    {
        $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost';
        $path = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/';
        return $this->getCurrentScheme() . '://' . $host . $path;
    }
837723
def get_current_url():
    
    if current_app.config.get('SERVER_NAME') and (
            # Check current hostname against server name, ignoring port numbers, if any (split on ':')
            request.environ['HTTP_HOST'].split(':', 1)[0] != current_app.config['SERVER_NAME'].split(':', 1)[0]):
        return request.url

    url = url_for(request.endpoint, **request.view_args)
    query = request.query_string
    if query:
        return url + '?' + query.decode()
    else:
        return url
1161960
function (pageNum) {
            var imgPath = util.template(config.template.img, { page: pageNum });
            return config.url + imgPath + config.queryString;
        }
103509
function getUrl(version = current) {
	const name = `native-ext-v${version}-${os}-${arch}.${ext}`;
	return `https://github.com/NiklasGollenstede/native-ext/releases/download/v${version}/`+ name;
}
981181
public function getCurrentPage()
    {
        $givenRelativeFile = str_replace(
            $this->environment->getSourceDirectory(),
            '',
            $this->environment->getSourceFile()
        );

        return str_replace('.twig', '', $givenRelativeFile);
    }
261847
function (pageRequest) {
            var map = this.__urlMap.urlToPageId, pageId = pageRequest.pageId, url = pageRequest.url;
            if (pageId) {
                return pageId;
            }
            if (url) {
                var returnUrl = map[url] || map[url + "/"] || map[url.replace(/\/$/, "")];
                if (returnUrl) {
                    return returnUrl;
                }
            }
            return this.__config.homePageId;
        }
1161555
function () {
            var url = this.getUrl();
            var pageId = this._cache[url] ? this._cache[url].id : null;
            if (pageId) {
                if (this._navigate) {
                    this.$callback(this._navigate, {
                        pageId : pageId,
                        url : url
                    });
                }
            } else {
                this._addInCache(url, this._lastPageId);
            }
        }
153327
public static function getCurrentUrl() 
    {
        $pageURL = 'http';
        
        if (isset($_SERVER["HTTPS"])) 
        {
            $pageURL .= "s";
        }
        
        $pageURL .= "://";

        if ($_SERVER["SERVER_PORT"] != "80") 
        {
            $pageURL .= $_SERVER["SERVER_NAME"] . ":" . 
                        $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
        } 
        else 
        {
            $pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
        }

        return $pageURL;
    }
681227
function getCurrentUrl() {
	var root = cleanRoot(),
		location = LOCATION(),
		loc = (location.pathname + location.search),
		index = loc.indexOf(root);

	return loc.substr(index + root.length);
}
722780
protected function getCurrentUri() {
    $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'
      ? 'https://'
      : 'http://';
    $current_uri = $protocol . $_SERVER['HTTP_HOST'] . $this->getRequestUri();
    $parts = parse_url($current_uri);

    $query = '';
    if (!empty($parts['query'])) {
      $params = array();
      parse_str($parts['query'], $params);
      $params = array_filter($params);
      if (!empty($params)) {
        $query = '?' . http_build_query($params, NULL, '&');
      }
    }

    // Use port if non default.
    $port = isset($parts['port']) &&
      (($protocol === 'http://' && $parts['port'] !== 80) || ($protocol === 'https://' && $parts['port'] !== 443))
      ? ':' . $parts['port'] : '';

    // Rebuild.
    return $protocol . $parts['host'] . $port . $parts['path'] . $query;
  }
152742
function resolveProtocolRelativeURL (absolute, relative) {
  var protocol;

  if (absolute) {
    // Get the protocol from the absolute URL
    protocol = protocolPattern.exec(absolute)[0];
  }
  else {
    // Use the current page's protocol
    protocol = location.protocol;
  }

  return protocol + relative;
}
1281859
protected function generateCanonicalUrl()
    {
        $extCompat7 = ExtensionManagementUtility::isLoaded('compatibility7');
        //User has specified a canonical URL in the page properties
        if (!empty($this->pageRecord['tx_metaseo_canonicalurl'])) {
            return $this->generateLink($this->pageRecord['tx_metaseo_canonicalurl']);
        }

        //Fallback to global settings to generate Url
        if (!empty($this->tsSetupSeo['canonicalUrl'])) {
            list($clUrl, $clLinkConf, $clDisableMpMode) = $this->detectCanonicalPage(
                $this->tsSetupSeo['canonicalUrl.']
            );
            if (!empty($clUrl) && isset($clLinkConf) && isset($clDisableMpMode)) {
                $url = $this->generateLink($clUrl, $clLinkConf, $clDisableMpMode);
                return $this->setFallbackProtocol(
                    $extCompat7 ? $this->pageRecord['url_scheme'] : null, //page properties protocol selection
                    $this->tsSetupSeo['canonicalUrl.']['fallbackProtocol'],
                    $url
                );
            }
        }

        return null;
    }
1008602
function canonicalPath() {
  var canon = canonical();
  if (!canon) return window.location.pathname;
  var parsed = url.parse(canon);
  return parsed.pathname;
}
829181
protected function getCurrentUrl() {
    $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'
      ? 'https://'
      : 'http://';
    $currentUrl = $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    $parts = parse_url($currentUrl);

    // drop known fb params
    $query = '';
    if (!empty($parts['query'])) {
      $params = array();
      parse_str($parts['query'], $params);
      foreach(self::$DROP_QUERY_PARAMS as $key) {
        unset($params[$key]);
      }
      if (!empty($params)) {
        $query = '?' . http_build_query($params, null, '&');
      }
    }

    // use port if non default
    $port =
      isset($parts['port']) &&
      (($protocol === 'http://' && $parts['port'] !== 80) ||
       ($protocol === 'https://' && $parts['port'] !== 443))
      ? ':' . $parts['port'] : '';

    // rebuild
    return $protocol . $parts['host'] . $port . $parts['path'] . $query;
  }