@@ -3,6 +3,7 @@ import { callHook } from '../init/lifecycle';
33import { getParentPath , stringifyQuery } from '../router/util' ;
44import { noop } from '../util/core' ;
55import { getAndActive } from '../event/sidebar' ;
6+ import { isExternal } from '../../../packages/docsify-server-renderer/src/utils' ;
67import { get } from './ajax' ;
78
89function loadNested ( path , qs , file , next , vm , first ) {
@@ -20,20 +21,20 @@ function loadNested(path, qs, file, next, vm, first) {
2021 ) . then ( next , _ => loadNested ( path , qs , file , next , vm ) ) ;
2122}
2223
23- // Borrowed from https://j11y.io/snippets/getting-a-fully-qualified-url.
24- function qualifyURL ( url ) {
25- const img = document . createElement ( 'img' ) ;
26- img . src = url ; // set string url
27- url = img . src ; // get qualified url
28- img . src = '' ; // prevent the server request
29- return url ;
30- }
31-
32- export function isExternal ( url ) {
33- url = qualifyURL ( url ) ;
34- url = new URL ( url ) ;
35- return url . origin !== location . origin ;
36- }
24+ // // Borrowed from https://j11y.io/snippets/getting-a-fully-qualified-url.
25+ // function qualifyURL(url) {
26+ // const img = document.createElement('img');
27+ // img.src = url; // set string url
28+ // url = img.src; // get qualified url
29+ // img.src = ''; // prevent the server request
30+ // return url;
31+ // }
32+
33+ // export function isExternal(url) {
34+ // url = qualifyURL(url);
35+ // url = new URL(url);
36+ // return url.origin !== location.origin;
37+ // }
3738
3839export function fetchMixin ( proto ) {
3940 let last ;
0 commit comments