Merge remote-tracking branch 'upstream/cleanup' into fixups

This commit is contained in:
reverb5264 2022-04-12 10:41:15 -07:00
commit 511a3ab90b
23 changed files with 715 additions and 1116 deletions

View file

@ -8430,3 +8430,121 @@ tyb3kz
tyawj8
tya3uw
ty9636
u111qj
u110p0
u10yvd
u10viu
u10slw
u10rta
u10qs6
u10ps7
u10p1q
u10n8u
u10mkl
u10ljm
u10kzi
u1062c
u100l7
u0zu5h
u0zsl2
u0zlmh
u0zksr
u0z7lv
u0z76f
u0z2xh
u0z0do
u0yo2a
u0ym4w
u0yjrm
u0xx82
u0xwma
u0x7ao
u0wyvt
u0wh01
u0wf5i
u0w67f
u0vply
u0vm1i
u0vaga
u0v53w
u0v3d9
u0uywc
u0uxpx
u0usw4
u0uqmf
u0unl8
u0um9i
u0ui2e
u0uhsi
u0ugvt
u0ugt6
u0uafq
u0u3eh
u0txtl
u0tidp
u0tcd8
u0syph
u0sxef
u0swce
u0s3hg
u0rxa6
u0rc00
u0r2d2
u0quu8
u0qsu2
u0qs4m
u0qp3m
u0qj8t
u0qecu
u0qd9o
u0qcl9
u0pktk
u0pjrf
u0p97v
u0p0gp
u0oxb5
u0ovcw
u0one2
u0odqb
u0o9vu
u0o6yg
u0o2uy
u0ny8w
u0nx4x
u0nvr4
u0nu1q
u1i035
u1huft
u1hkm0
u1hi3b
u1h5qv
u1eptq
u1dxtp
u1dl6n
u1cstp
u1c1d4
u1aovf
u1ajro
u1aibg
u1agdn
u1afna
u1acfb
u1abm9
u1aara
u1a9u3
u1a8dm
u1a7qf
u1a31o
u1a0xi
u1a0rt
u19sp2
u16zq6
u16onh
u15lrh
u13gcr
u139b1
u12oy9
u12m8r
u127qi
u117oa
u115md

View file

@ -2,3 +2,9 @@
for = "/*"
[headers.values]
Access-Control-Allow-Origin = "*"
[[headers]]
for = "/_img/place/*.png"
[headers.values]
# 28 days
cache-control = "public, max-age=604800"

View file

@ -120,6 +120,20 @@ def remove_extras(entry: dict):
return entry
def remove_duplicate_points(entry: dict):
"""
Removes points from paths that occur twice after each other
"""
path: list = entry['path']
previous: list = path[0]
for i in range(len(path)-1, -1, -1):
current: list = path[i]
if current == previous:
path.pop(i)
previous = current
return entry
def fix_r_caps(entry: dict):
"""
Fixes capitalization of /r/. (/R/place -> /r/place)
@ -298,7 +312,9 @@ def print_(*args, **kwargs):
entry = fix_no_protocol_urls(entry)
print_("Removing extras...")
entry = remove_extras(entry)
print_("Updating center")
print_("Removing duplicate points...")
entry = remove_duplicate_points(entry)
print_("Updating center...")
entry = update_center(entry)
print_("Validating...")
status_code = validate(entry)

View file

@ -1,148 +0,0 @@
u0mydr
u0mwxj
u0mwcx
u0mu37
u0ms72
u0mrgz
u0mqfj
u0mozw
u0mkko
u0mk12
u0mj93
u0mg5r
u0mefl
u0mdkc
u0mchi
u0mb6y
u0m7ol
u0m6uo
u0m5xy
u0m4kn
u0m3up
u0m2sl
u0m17q
u0m0o7
u0m0e2
u0lkqg
u0ljzj
u0lg1v
u0la9m
u0l8u8
u0l6mx
u0l04x
u0kzax
u0kw47
u0kvqb
u0km4v
u0kiy3
u0kcvk
u0k5tx
u0k0hp
u0jgjs
u0ja8g
u0ihnt
u0hnpj
u0hnmq
u0hcsf
u0gg84
u0flsv
u0ffg3
u0fewx
u0ctn0
u0c4jg
u0c3s4
u0c241
u0bzn5
u0by7b
u0bplz
u0be15
u0bcky
u0bc1w
u0bbkz
u0b40q
u0b3o4
u0b397
u0b2x1
u0ayk7
u0axny
u0awwp
u0awbz
u0avnr
u0an4y
u0alur
u0aiaj
u0ado3
u0a8h0
u0a7l8
u0a6tn
u0a5jp
u0a3so
u0a0tv
u0a0ay
u09zv0
u09ssy
u09rhm
u09oc3
u09jbs
u09i2s
u09fzu
u09eti
u09dms
u09dg6
u09ben
u099j5
u0977w
u096fm
u095x4
u090mi
u0904c
u08vz6
u08rdk
u08ngp
u08jdo
u08g67
u08emv
u08dc7
u08ch9
u089ja
u088bg
u0880k
u086n0
u084u1
u082p3
u0828x
u081u8
u0818m
u080s5
u07zh3
u07z4w
u07xr3
u07vk2
u07vja
u07uny
u07u1d
u07i8s
u077yo
u077y1
u075jt
u074p5
u073rt
u0738i
u070h9
u06pis
u06p92
tyrqka
tygp7u
tyfydt
tyfxq9
tyftac
tyezt5
tyenua
tydut9
tyd560
tybjpt
tybbnt
tyb3kz
tyawj8
tya3uw
ty9636

Binary file not shown.

File diff suppressed because one or more lines are too long

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" width="71" height="55" x="0" y="0" viewBox="0 0 71 55">
<g>
<path fill="#FFF" d="M60.1045 4.8978C55.5792 2.8214 50.7265 1.2916 45.6527 0.41542C45.5603 0.39851 45.468 0.440769 45.4204 0.525289C44.7963 1.6353 44.105 3.0834 43.6209 4.2216C38.1637 3.4046 32.7345 3.4046 27.3892 4.2216C26.905 3.0581 26.1886 1.6353 25.5617 0.525289C25.5141 0.443589 25.4218 0.40133 25.3294 0.41542C20.2584 1.2888 15.4057 2.8186 10.8776 4.8978C10.8384 4.9147 10.8048 4.9429 10.7825 4.9795C1.57795 18.7309 -0.943561 32.1443 0.293408 45.3914C0.299005 45.4562 0.335386 45.5182 0.385761 45.5576C6.45866 50.0174 12.3413 52.7249 18.1147 54.5195C18.2071 54.5477 18.305 54.5139 18.3638 54.4378C19.7295 52.5728 20.9469 50.6063 21.9907 48.5383C22.0523 48.4172 21.9935 48.2735 21.8676 48.2256C19.9366 47.4931 18.0979 46.6 16.3292 45.5858C16.1893 45.5041 16.1781 45.304 16.3068 45.2082C16.679 44.9293 17.0513 44.6391 17.4067 44.3461C17.471 44.2926 17.5606 44.2813 17.6362 44.3151C29.2558 49.6202 41.8354 49.6202 53.3179 44.3151C53.3935 44.2785 53.4831 44.2898 53.5502 44.3433C53.9057 44.6363 54.2779 44.9293 54.6529 45.2082C54.7816 45.304 54.7732 45.5041 54.6333 45.5858C52.8646 46.6197 51.0259 47.4931 49.0921 48.2228C48.9662 48.2707 48.9102 48.4172 48.9718 48.5383C50.038 50.6034 51.2554 52.5699 52.5959 54.435C52.6519 54.5139 52.7526 54.5477 52.845 54.5195C58.6464 52.7249 64.529 50.0174 70.6019 45.5576C70.6551 45.5182 70.6887 45.459 70.6943 45.3942C72.1747 30.0791 68.2147 16.7757 60.1968 4.9823C60.1772 4.9429 60.1437 4.9147 60.1045 4.8978ZM23.7259 37.3253C20.2276 37.3253 17.3451 34.1136 17.3451 30.1693C17.3451 26.225 20.1717 23.0133 23.7259 23.0133C27.308 23.0133 30.1626 26.2532 30.1066 30.1693C30.1066 34.1136 27.28 37.3253 23.7259 37.3253ZM47.3178 37.3253C43.8196 37.3253 40.9371 34.1136 40.9371 30.1693C40.9371 26.225 43.7636 23.0133 47.3178 23.0133C50.9 23.0133 53.7545 26.2532 53.6986 30.1693C53.6986 34.1136 50.9 37.3253 47.3178 37.3253Z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="272.84375"
height="177.59375"
id="svg2">
<defs
id="defs4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(-116.4375,-348.78125)"
id="layer1">
<path
d="M 368.07001,380.00645 252.85714,495.16383 137.64427,380.00645"
id="path2985"
style="fill:none;stroke:#ffffff;stroke-width:30;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="165.15738"
height="260.42575"
id="svg2">
<defs
id="defs4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(-170.27845,-307.37227)"
id="layer1">
<path
d="M 310.43583,552.79802 195.27845,437.58514 310.43583,322.37227"
id="path2985"
style="fill:none;stroke:#ffffff;stroke-width:30;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="165.15738"
height="260.42575"
id="svg2">
<defs
id="defs4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(-170.27845,-307.37227)"
id="layer1">
<path
d="M 195.27845,552.79802 310.43583,437.58514 195.27845,322.37227"
id="path2985"
style="fill:none;stroke:#ffffff;stroke-width:30;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -1,40 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="15.26367"
height="15.3125"
id="svg2">
<defs
id="defs4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(-188.36328,-392.51062)"
id="layer1">
<g
id="text2985"
style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Open Sans;-inkscape-font-specification:Open Sans">
<path
d="m 188.36328,392.51062 15.26367,0 -7.63672,15.3125 -7.62695,-15.3125"
id="path2990"
style="fill:#ffffff;fill-opacity:0.63274339" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="63.97776"
height="63.985764"
id="svg2">
<defs
id="defs4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(-239.44047,-363.22698)"
id="layer1">
<path
d="m 290.96332,384.19885 c -0.59424,-6.27896 -6.01049,-8.39164 -12.8518,-9.00126 l 0.0128,-8.70824 -5.30062,-0.007 -0.0123,8.47872 c -1.39346,-0.002 -2.81788,0.0235 -4.23308,0.0496 l 0.0135,-8.53485 -5.29778,-0.008 -0.0149,8.70575 c -1.14765,0.0217 -2.27469,0.0414 -3.3736,0.0405 l -5.3e-4,-0.0271 -7.31086,-0.0134 -0.007,5.66124 c 0,0 3.91442,-0.0688 3.84925,0.003 2.14703,0.004 2.84397,1.25133 3.04562,2.32724 l -0.0143,9.92049 c 0.14815,0.001 0.34143,0.008 0.56022,0.0378 -0.17659,-3e-5 -0.36561,-0.002 -0.55995,-1.2e-4 l -0.022,13.89765 c -0.0952,0.67556 -0.49402,1.75232 -1.99407,1.75269 0.0678,0.0602 -3.85316,-0.007 -3.85316,-0.007 l -1.06259,6.32874 6.89801,0.01 c 1.28367,0.003 2.54669,0.0271 3.78665,0.0368 l -0.0109,8.80736 5.29494,0.009 0.0128,-8.71427 c 1.45379,0.0322 2.86073,0.0459 4.23429,0.0466 l -0.0152,8.67412 5.30061,0.007 0.0147,-8.79173 c 8.91219,-0.49805 15.1527,-2.73385 15.93965,-11.10113 0.63533,-6.73752 -2.53,-9.74895 -7.5868,-10.97123 3.07554,-1.56033 5.00104,-4.31475 4.55848,-8.90928 z m -7.44387,18.82121 c -0.007,6.58182 -11.27551,5.81643 -14.86789,5.81449 l 0.0187,-11.66923 c 3.59343,0.006 14.85983,-1.01023 14.84919,5.85474 z m -2.44078,-16.46738 c -0.0106,5.98811 -9.40836,5.27536 -12.40064,5.27116 l 0.016,-10.58348 c 2.99229,0.004 12.39322,-0.93337 12.38461,5.31232 z"
id="path3010"
style="fill:#ffffff" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 B

View file

@ -1,46 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="192.84375"
height="192.875"
id="svg2">
<defs
id="defs4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="matrix(1.2121574,0,0,1.2121574,-20.456139,-20.460051)"
id="g3804"
style="stroke:#ffffff;stroke-opacity:1">
<g
transform="translate(-156.4375,-398.78125)"
id="layer1"
style="stroke:#ffffff;stroke-opacity:1">
<path
d="M 195.27845,552.79802 310.43583,437.64064"
id="path2985"
style="fill:none;stroke:#ffffff;stroke-width:24.74926186;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
d="M 310.43583,552.79802 195.27845,437.64064"
id="path3802"
style="fill:none;stroke:#ffffff;stroke-width:24.74926186;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="192.84375"
height="192.875"
id="svg2">
<defs
id="defs4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(-156.4375,-398.78125)"
id="layer1">
<path
d="m 171.42857,495.21933 162.85714,0"
id="path2985"
style="fill:none;stroke:#ffffff;stroke-width:30;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1 KiB

View file

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="192.84375"
height="192.875"
id="svg2">
<defs
id="defs4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(-156.4375,-398.78125)"
id="layer1">
<path
d="m 334.28394,576.65207 -162.85044,0 -4.6e-4,-162.86607 162.85078,0 z"
id="path3755"
style="fill:none;stroke:#ffffff;stroke-width:30;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -1,40 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="192.84375"
height="192.875"
id="svg2">
<defs
id="defs4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(-156.4375,-398.78125)"
id="layer1">
<path
d="m 171.42857,495.21933 162.85714,0"
id="path2985"
style="fill:none;stroke:#ffffff;stroke-width:30;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
d="m 252.85714,413.79076 0,162.85714"
id="path3755"
style="fill:none;stroke:#ffffff;stroke-width:30;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -31,7 +31,7 @@ function createInfoBlock(entry) {
let headerElement = document.createElement("h2");
let linkElement = document.createElement("a");
linkElement.href = "?id=" + entry.id;
linkElement.href = "#" + entry.id;
linkElement.innerText = entry.name;
headerElement.appendChild(linkElement);

View file

@ -110,6 +110,14 @@ async function init(){
} else {
mode = "view";
}
// Backwards compatibility for old links using "search" id arg
if(args.includes("id=")){
let idHash = args.split("id=")[1].split("&")[0];
window.location.hash = idHash;
let idArgMatch = new RegExp(`id=${idHash}&?`); // Patten for the id plus a following & if present
window.location.search = window.location.search.substring(1).replace(idArgMatch, "");
}
}
document.body.dataset.mode = mode

View file

@ -27,12 +27,8 @@ function initOverlap(){
render();
updateLines();
var args = window.location.search;
if(args){
id = args.split("id=")[1];
if(id){
highlightEntryFromUrl();
}
if(window.location.hash){
highlightEntryFromUrl();
}
function renderBackground(atlas) {

View file

@ -102,7 +102,7 @@ hideListButton.addEventListener("click", function(e){
} else {
wrapper.classList.add('listHidden')
}
updateHovering();
updateHovering(e);
applyView();
render();
updateLines();
@ -154,7 +154,7 @@ window.addEventListener("resize", function(){
entriesListShown = false;
wrapper.className += " listHidden";
}
updateHovering();
updateHovering(e);
viewportWidth = document.documentElement.clientWidth;
@ -445,7 +445,7 @@ function buildObjectsList(filter, sort){
zoom = 4;
renderBackground(atlas);
applyView();
updateHovering();
updateHovering(e);
zoomOrigin = [
innerContainer.clientWidth/2 - this.entry.center[0]* zoom// + container.offsetLeft
@ -672,22 +672,14 @@ function updateHovering(e, tapped){
}
}
window.addEventListener("hashchange", highlightEntryFromUrl);
function highlightEntryFromUrl(){
var objectsContainer = document.getElementById("objectsList");
var id = 0;
var args = window.location.search;
if(args){
id = args.split("id=")[1];
if(id){
id = id.split("&")[0];
}
}
var id = window.location.hash.substring(1); //Remove hash prefix
//var id = parseInt(window.location.hash.substring(3));
var entries = atlas.filter(function(e){
return e.id === id;
});
@ -752,12 +744,8 @@ function initView(){
render();
updateLines();
var args = window.location.search;
if(args){
id = args.split("id=")[1];
if(id){
highlightEntryFromUrl();
}
if(window.location.hash){ // both "/" and just "/#" will be an empty hash string
highlightEntryFromUrl();
}
}

File diff suppressed because one or more lines are too long

View file

@ -129,10 +129,10 @@ <h1 id="title">The 2022 /r/place Atlas</h1>
</div>
</div>
<a title="Discord" href="https://discord.gg/pJkm23b2nA" class="button small" id="entriesListDiscord">
<img class="Discord" alt="Discord Logo" src="./_img/discord.svg">
<svg xmlns="http://www.w3.org/2000/svg" width="71" height="55" viewBox="0 0 71 55"><path fill="#FFF" d="M60 5a59 59 0 0 0-15-4l-1 3H27a37 37 0 0 0-2-4 58 58 0 0 0-14 5A60 60 0 0 0 0 46a59 59 0 0 0 18 8l4-5v-1l-6-2v-1a30 30 0 0 0 2-1 42 42 0 0 0 36 0l1 1v1l-6 2v1a47 47 0 0 0 4 6 59 59 0 0 0 18-10A60 60 0 0 0 60 5ZM24 37c-4 0-7-3-7-7s3-7 7-7c3 0 6 3 6 7s-3 7-6 7Zm23 0c-3 0-6-3-6-7s3-7 6-7c4 0 7 3 7 7s-3 7-7 7Z"/ alt="Discord"></svg>
</a>
<button title="Donate!" id="entriesListDonate" class="small">
<img alt="Donate" src="data:image/svg+xml;utf8,%3Csvg%0A%20%20%20xmlns%3Adc%3D%22http%3A//purl.org/dc/elements/1.1/%22%0A%20%20%20xmlns%3Acc%3D%22http%3A//creativecommons.org/ns%23%22%0A%20%20%20xmlns%3Ardf%3D%22http%3A//www.w3.org/1999/02/22-rdf-syntax-ns%23%22%0A%20%20%20xmlns%3Asvg%3D%22http%3A//www.w3.org/2000/svg%22%0A%20%20%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%0A%20%20%20version%3D%221.1%22%0A%20%20%20width%3D%2263.97776%22%0A%20%20%20height%3D%2263.985764%22%0A%20%20%20id%3D%22svg2%22%3E%0A%20%20%3Cdefs%0A%20%20%20%20%20id%3D%22defs4%22%20/%3E%0A%20%20%3Cmetadata%0A%20%20%20%20%20id%3D%22metadata7%22%3E%0A%20%20%20%20%3Crdf%3ARDF%3E%0A%20%20%20%20%20%20%3Ccc%3AWork%0A%20%20%20%20%20%20%20%20%20rdf%3Aabout%3D%22%22%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Aformat%3Eimage/svg+xml%3C/dc%3Aformat%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Atype%0A%20%20%20%20%20%20%20%20%20%20%20rdf%3Aresource%3D%22http%3A//purl.org/dc/dcmitype/StillImage%22%20/%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Atitle%3E%3C/dc%3Atitle%3E%0A%20%20%20%20%20%20%3C/cc%3AWork%3E%0A%20%20%20%20%3C/rdf%3ARDF%3E%0A%20%20%3C/metadata%3E%0A%20%20%3Cg%0A%20%20%20%20%20transform%3D%22translate%28-239.44047%2C-363.22698%29%22%0A%20%20%20%20%20id%3D%22layer1%22%3E%0A%20%20%20%20%3Cpath%0A%20%20%20%20%20%20%20d%3D%22m%20290.96332%2C384.19885%20c%20-0.59424%2C-6.27896%20-6.01049%2C-8.39164%20-12.8518%2C-9.00126%20l%200.0128%2C-8.70824%20-5.30062%2C-0.007%20-0.0123%2C8.47872%20c%20-1.39346%2C-0.002%20-2.81788%2C0.0235%20-4.23308%2C0.0496%20l%200.0135%2C-8.53485%20-5.29778%2C-0.008%20-0.0149%2C8.70575%20c%20-1.14765%2C0.0217%20-2.27469%2C0.0414%20-3.3736%2C0.0405%20l%20-5.3e-4%2C-0.0271%20-7.31086%2C-0.0134%20-0.007%2C5.66124%20c%200%2C0%203.91442%2C-0.0688%203.84925%2C0.003%202.14703%2C0.004%202.84397%2C1.25133%203.04562%2C2.32724%20l%20-0.0143%2C9.92049%20c%200.14815%2C0.001%200.34143%2C0.008%200.56022%2C0.0378%20-0.17659%2C-3e-5%20-0.36561%2C-0.002%20-0.55995%2C-1.2e-4%20l%20-0.022%2C13.89765%20c%20-0.0952%2C0.67556%20-0.49402%2C1.75232%20-1.99407%2C1.75269%200.0678%2C0.0602%20-3.85316%2C-0.007%20-3.85316%2C-0.007%20l%20-1.06259%2C6.32874%206.89801%2C0.01%20c%201.28367%2C0.003%202.54669%2C0.0271%203.78665%2C0.0368%20l%20-0.0109%2C8.80736%205.29494%2C0.009%200.0128%2C-8.71427%20c%201.45379%2C0.0322%202.86073%2C0.0459%204.23429%2C0.0466%20l%20-0.0152%2C8.67412%205.30061%2C0.007%200.0147%2C-8.79173%20c%208.91219%2C-0.49805%2015.1527%2C-2.73385%2015.93965%2C-11.10113%200.63533%2C-6.73752%20-2.53%2C-9.74895%20-7.5868%2C-10.97123%203.07554%2C-1.56033%205.00104%2C-4.31475%204.55848%2C-8.90928%20z%20m%20-7.44387%2C18.82121%20c%20-0.007%2C6.58182%20-11.27551%2C5.81643%20-14.86789%2C5.81449%20l%200.0187%2C-11.66923%20c%203.59343%2C0.006%2014.85983%2C-1.01023%2014.84919%2C5.85474%20z%20m%20-2.44078%2C-16.46738%20c%20-0.0106%2C5.98811%20-9.40836%2C5.27536%20-12.40064%2C5.27116%20l%200.016%2C-10.58348%20c%202.99229%2C0.004%2012.39322%2C-0.93337%2012.38461%2C5.31232%20z%22%0A%20%20%20%20%20%20%20id%3D%22path3010%22%0A%20%20%20%20%20%20%20style%3D%22fill%3A%23ffffff%22%20/%3E%0A%20%20%3C/g%3E%0A%3C/svg%3E">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path d="M291 384c-1-6-6-8-13-9v-9h-5v9h-4v-9h-6v9h-10v6h3c3 0 3 1 3 2v10h1-1v14c0 1 0 2-2 2h-3l-1 6h10v9h6v-9h4v9h5v-9c9 0 15-3 16-11 1-7-3-10-8-11 3-1 5-4 5-9zm-7 19c0 7-12 6-15 6v-12c3 0 15-1 15 6zm-3-16c0 6-9 5-12 5v-11c3 0 12-1 12 6z" style="fill:#fff" transform="translate(-239 -363)"/ alt="Donate"></svg>
</button>
</nav>
<div id="entriesListControls">