mirror of
https://github.com/placeAtlas/atlas.git
synced 2024-11-05 23:29:43 +01:00
07ffc41fa4
Nearly nobody bat an eye on this one (better check the LICENSE file on GitHub), also now make it so it doesn't get removed when minified
76 lines
1.3 KiB
HTML
76 lines
1.3 KiB
HTML
|
|
<!--
|
|
The 2022 r/place Atlas
|
|
Copyright (c) 2017 Roland Rytz <roland@draemm.li>
|
|
Copyright (c) 2022 Place Atlas contributors
|
|
Licensed under AGPL-3.0 (https://place-atlas.stefanocoding.me/license.txt)
|
|
-->
|
|
|
|
<!--
|
|
|
|
This shrinks the Atlas by making it arrays instead of objects, but
|
|
the difference in size is only about 100k, so it's probably not
|
|
worth the effort
|
|
|
|
-->
|
|
|
|
|
|
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>
|
|
Smallifier
|
|
</title>
|
|
<style>
|
|
html, body{
|
|
height: 100%;
|
|
width: 100%;
|
|
}
|
|
#output{
|
|
height: 90%;
|
|
width: 90%;
|
|
display: block;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<textarea id="output"></textarea>
|
|
|
|
<script type="text/javascript" src="../web/_js/atlas.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
var smallifiedAtlas = [];
|
|
|
|
for(var i = 0; i < atlas.length; i++){
|
|
|
|
smallifiedAtlas.push([
|
|
atlas[i].id
|
|
,atlas[i].name
|
|
,atlas[i].description
|
|
,atlas[i].website
|
|
,atlas[i].subreddit
|
|
,atlas[i].center
|
|
,atlas[i].path
|
|
]);
|
|
|
|
}
|
|
|
|
console.log(atlas.length, smallifiedAtlas.length);
|
|
|
|
var jsonString = JSON.stringify(smallifiedAtlas, null, 0);
|
|
var textarea = document.getElementById("output");
|
|
textarea.innerHTML = "var atlas = "+jsonString+";";
|
|
|
|
|
|
</script>
|
|
|
|
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|
|
|