File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -80,11 +80,19 @@ document.addEventListener("DOMContentLoaded", function () {
8080 }
8181
8282 document . querySelectorAll ( "a" ) . forEach ( ( link ) => {
83- if ( ! isGoogleTranslateUrl ( currentUrl ) ) {
83+ const href = link . getAttribute ( "href" ) ;
84+ console . log ( `href: ${ href } ` ) ;
85+ if ( ! href ) {
8486 return ;
8587 }
8688
87- let originalUrl = getOriginalUrl ( link . href ) ;
89+ if ( ! isGoogleTranslateUrl ( href ) ) {
90+ console . log ( href , "Not a Google Translate URL" ) ;
91+ return ;
92+ }
93+
94+ let originalUrl = getOriginalUrl ( href ) ;
95+ console . log ( "originalUrl" , originalUrl ) ;
8896 if ( ! originalUrl . includes ( "wiki.gdevelop.io" ) ) {
8997 // If the original URL is not from the wiki, we need to change it to the original URL.
9098 // Otherwise, we just keep the original URL.
You can’t perform that action at this time.
0 commit comments