(url)
| 14 | } |
| 15 | |
| 16 | function isExternal(url) { |
| 17 | let match = url.match( |
| 18 | /^([^:/?#]+:)?(?:\/\/([^/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/ |
| 19 | ); |
| 20 | if ( |
| 21 | typeof match[1] === 'string' && |
| 22 | match[1].length > 0 && |
| 23 | match[1].toLowerCase() !== location.protocol |
| 24 | ) { |
| 25 | return true; |
| 26 | } |
| 27 | if ( |
| 28 | typeof match[2] === 'string' && |
| 29 | match[2].length > 0 && |
| 30 | match[2].replace( |
| 31 | new RegExp( |
| 32 | ':(' + { 'http:': 80, 'https:': 443 }[location.protocol] + ')?$' |
| 33 | ), |
| 34 | '' |
| 35 | ) !== location.host |
| 36 | ) { |
| 37 | return true; |
| 38 | } |
| 39 | return false; |
| 40 | } |
| 41 | |
| 42 | function mainTpl(config) { |
| 43 | let html = `<nav class="app-nav${ |
no outgoing calls
no test coverage detected
searching dependent graphs…