Skip to content

Commit

Permalink
Add locale code to embeded-demo.js file and remove from all index.htm…
Browse files Browse the repository at this point in the history
…l files
  • Loading branch information
AliyanH authored and prushforth committed Oct 31, 2024
1 parent 0235260 commit dd98550
Show file tree
Hide file tree
Showing 18 changed files with 5 additions and 85 deletions.
5 changes: 5 additions & 0 deletions static/demo/embeded-demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,8 @@ catch (err) {
// when demo page is not opened as an iframe, display default theme
}

// Append lang = fr, so the map may be able to be localized in fr
if (window.parent.location.href.includes('/fr/')) {
document.firstElementChild.lang = 'fr';
}

5 changes: 0 additions & 5 deletions static/demo/extent-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo</title>
<script>
if (window.parent.location.href.includes('/fr/')) {
document.firstElementChild.lang = 'fr';
}
</script>
<script type="module" src="../../dist/mapml.js"></script>
<link rel="stylesheet" href="../embeded-demo-style.css"/>

Expand Down
5 changes: 0 additions & 5 deletions static/demo/layer-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo</title>
<script>
if (window.parent.location.href.includes('/fr/')) {
document.firstElementChild.lang = 'fr';
}
</script>
<script type="module" src="../../dist/mapml.js"></script>
<link rel="stylesheet" href="../embeded-demo-style.css"/>

Expand Down
5 changes: 0 additions & 5 deletions static/demo/map-a-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo</title>
<script>
if (window.parent.location.href.includes('/fr/')) {
document.firstElementChild.lang = 'fr';
}
</script>
<script type="module" src="../../dist/mapml.js"></script>
<link rel="stylesheet" href="../embeded-demo-style.css"/>

Expand Down
5 changes: 0 additions & 5 deletions static/demo/map-caption-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo</title>
<script>
if (window.parent.location.href.includes('/fr/')) {
document.firstElementChild.lang = 'fr';
}
</script>
<script type="module" src="../../dist/mapml.js"></script>
<link rel="stylesheet" href="../embeded-demo-style.css"/>

Expand Down
5 changes: 0 additions & 5 deletions static/demo/map-datalist-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo</title>
<script>
if (window.parent.location.href.includes('/fr/')) {
document.firstElementChild.lang = 'fr';
}
</script>
<script type="module" src="../../dist/mapml.js"></script>
<link rel="stylesheet" href="../embeded-demo-style.css"/>

Expand Down
5 changes: 0 additions & 5 deletions static/demo/map-feature-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo</title>
<script>
if (window.parent.location.href.includes('/fr/')) {
document.firstElementChild.lang = 'fr';
}
</script>
<script type="module" src="../../dist/mapml.js"></script>
<link rel="stylesheet" href="../embeded-demo-style.css"/>

Expand Down
5 changes: 0 additions & 5 deletions static/demo/map-geometry-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo</title>
<script>
if (window.parent.location.href.includes('/fr/')) {
document.firstElementChild.lang = 'fr';
}
</script>
<script type="module" src="../../dist/mapml.js"></script>
<link rel="stylesheet" href="../embeded-demo-style.css"/>

Expand Down
5 changes: 0 additions & 5 deletions static/demo/map-input-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo</title>
<script>
if (window.parent.location.href.includes('/fr/')) {
document.firstElementChild.lang = 'fr';
}
</script>
<script type="module" src="../../dist/mapml.js"></script>
<link rel="stylesheet" href="../embeded-demo-style.css"/>

Expand Down
5 changes: 0 additions & 5 deletions static/demo/map-link-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo</title>
<script>
if (window.parent.location.href.includes('/fr/')) {
document.firstElementChild.lang = 'fr';
}
</script>
<script type="module" src="../../dist/mapml.js"></script>
<link rel="stylesheet" href="../embeded-demo-style.css"/>

Expand Down
5 changes: 0 additions & 5 deletions static/demo/map-meta-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo</title>
<script>
if (window.parent.location.href.includes('/fr/')) {
document.firstElementChild.lang = 'fr';
}
</script>
<script type="module" src="../../dist/mapml.js"></script>
<link rel="stylesheet" href="../embeded-demo-style.css"/>

Expand Down
5 changes: 0 additions & 5 deletions static/demo/map-properties-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo</title>
<script>
if (window.parent.location.href.includes('/fr/')) {
document.firstElementChild.lang = 'fr';
}
</script>
<script type="module" src="../../dist/mapml.js"></script>
<link rel="stylesheet" href="../embeded-demo-style.css"/>

Expand Down
5 changes: 0 additions & 5 deletions static/demo/map-select-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo</title>
<script>
if (window.parent.location.href.includes('/fr/')) {
document.firstElementChild.lang = 'fr';
}
</script>
<script type="module" src="../../dist/mapml.js"></script>
<link rel="stylesheet" href="../embeded-demo-style.css"/>

Expand Down
5 changes: 0 additions & 5 deletions static/demo/map-span-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo</title>
<script>
if (window.parent.location.href.includes('/fr/')) {
document.firstElementChild.lang = 'fr';
}
</script>
<script type="module" src="../../dist/mapml.js"></script>
<link rel="stylesheet" href="../embeded-demo-style.css"/>

Expand Down
5 changes: 0 additions & 5 deletions static/demo/map-style-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo</title>
<script>
if (window.parent.location.href.includes('/fr/')) {
document.firstElementChild.lang = 'fr';
}
</script>
<script type="module" src="../../dist/mapml.js"></script>
<link rel="stylesheet" href="../embeded-demo-style.css"/>

Expand Down
5 changes: 0 additions & 5 deletions static/demo/mapml-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo</title>
<script>
if (window.parent.location.href.includes('/fr/')) {
document.firstElementChild.lang = 'fr';
}
</script>
<script type="module" src="../../dist/mapml.js"></script>
<link rel="stylesheet" href="../embeded-demo-style.css"/>

Expand Down
5 changes: 0 additions & 5 deletions static/demo/mapml-viewer-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo</title>
<script>
if (window.parent.location.href.includes('/fr/')) {
document.firstElementChild.lang = 'fr';
}
</script>
<script type="module" src="../../dist/mapml.js"></script>
<link rel="stylesheet" href="../embeded-demo-style.css"/>

Expand Down
5 changes: 0 additions & 5 deletions static/demo/sandbox/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sandbox</title>
<script>
if (window.parent.location.href.includes('/fr/')) {
document.firstElementChild.lang = 'fr';
}
</script>
<script type="module" src="../../dist/mapml.js"></script>
<link rel="stylesheet" href="../sandbox.css"/>

Expand Down

0 comments on commit dd98550

Please sign in to comment.