Skip to content

Commit f538cf1

Browse files
authored
Update index.html
1 parent 3f9d40c commit f538cf1

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

index.html

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -222,17 +222,7 @@ <h1>Welcome to Vafor IT</h1>
222222

223223
<script>
224224
function getParentFolder() {
225-
var path = window.location.pathname;
226-
path = path.endsWith('/') ? path.slice(0, -1) : path;
227-
228-
var segments = path.split('/');
229-
230-
if (segments.length > 1) {
231-
return segments[segments.length - 2];
232-
} else {
233-
return '/';
234-
}
235-
225+
return window.location.origin; // Returns the protocol + domain
236226
}
237227

238228
let link2 = getParentFolder();

0 commit comments

Comments
 (0)