We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 57456eb commit f2a6682Copy full SHA for f2a6682
docs/javascript/translate.js
@@ -80,11 +80,19 @@ document.addEventListener("DOMContentLoaded", function () {
80
}
81
82
document.querySelectorAll("a").forEach((link) => {
83
- if (!isGoogleTranslateUrl(currentUrl)) {
+ const href = link.getAttribute("href");
84
+ console.log(`href: ${href}`);
85
+ if (!href) {
86
return;
87
88
- 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);
96
if (!originalUrl.includes("wiki.gdevelop.io")) {
97
// If the original URL is not from the wiki, we need to change it to the original URL.
98
// Otherwise, we just keep the original URL.
0 commit comments