File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -428,8 +428,6 @@ <h5>支持多种Registry,在镜像名前添加本站域名即可</h5>
428428 < strong > GitHub Container Registry:</ strong > < br >
429429 docker pull < span class ="domain-base "> </ span > /ghcr.io/user/image< br > < br >
430430
431- < strong > Google Container Registry:</ strong > < br >
432- docker pull < span class ="domain-base "> </ span > /gcr.io/project/image< br > < br >
433431
434432 < strong > Quay.io Registry:</ strong > < br >
435433 docker pull < span class ="domain-base "> </ span > /quay.io/org/image< br > < br >
@@ -454,18 +452,14 @@ <h5>支持多种Registry,在镜像名前添加本站域名即可</h5>
454452
455453 < script >
456454 document . addEventListener ( 'DOMContentLoaded' , function ( ) {
457- function getRootDomain ( ) {
458- let hostname = window . location . hostname ;
459- let parts = hostname . split ( '.' ) ;
460- if ( parts . length > 2 ) {
461- return parts . slice ( - 2 ) . join ( '.' ) ;
462- }
463- return hostname ;
455+ function getFullDomain ( ) {
456+ // 获取完整的域名(包括端口号)
457+ return window . location . host ;
464458 }
465459
466- let rootDomain = getRootDomain ( ) ;
460+ let fullDomain = getFullDomain ( ) ;
467461 document . querySelectorAll ( '.domain-base' ) . forEach ( span => {
468- span . textContent = rootDomain ;
462+ span . textContent = fullDomain ;
469463 } ) ;
470464
471465 const modal = document . getElementById ( 'dockerModal' ) ;
You can’t perform that action at this time.
0 commit comments