atlas/tools/smallifier.html
Hans5958 804159e116 Reduce copyright notice, add 2022 contributors, add missing notice
The lengthy boilerplate is unnecessary, especially since it is already linked. The type of license can stay there instead.
2022-04-09 16:33:10 +07:00

86 lines
1.6 KiB
HTML

<!--
========================================================================
The 2022 /r/place Atlas
An Atlas of Reddit's 2022 /r/place, with information to each
artwork of the canvas provided by the community.
Copyright (c) 2017 Roland Rytz <roland@draemm.li>
Copyright (c) 2022 r/placeAtlas2 contributors
Licensed under the GNU Affero General Public License Version 3
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>