๐Ÿ“ฆโž”๐Ÿฆ‹ Store and retrieve files on the Atmosphere
35
fork

Configure Feed

Select the types of activity you want to include in your feed.

add more PDS detection

Ducky 9fcc7a9f addda4ea

+24 -19
+24 -19
src/shared/util.sh
··· 681 681 unset pds_name 682 682 unset pds_emoji 683 683 684 - if [[ $pds_host == *".host.bsky.network" ]]; then 685 - bsky_host="$(echo "$pds_host" | cut -d "." -f 1)" 686 - bsky_region="$(echo "$pds_host" | cut -d "." -f 2)" 684 + case "$pds_host" in 685 + *".host.bsky.network") 686 + bsky_host="$(echo "$pds_host" | cut -d "." -f 1)" 687 + bsky_region="$(echo "$pds_host" | cut -d "." -f 2)" 687 688 688 - pds_name="${bsky_host^} ($(atfile.util.get_region_pretty "$bsky_region"))" 689 - pds_emoji="๐Ÿ„" 690 - elif [[ $pds_host == "atproto.brid.gy" ]]; then 691 - pds_name="Bridgy Fed" 692 - pds_emoji="๐Ÿ”€" 693 - else 694 - pds_oauth_url="$pds/oauth/authorize" 695 - pds_oauth_page="$(curl -H "User-Agent: $(atfile.util.get_uas)" -s -L -X GET "$pds_oauth_url" | tr -d '\n')" 696 - pds_customization_data="$(echo "$pds_oauth_page" | sed -s s/.*_customizationData\"]=//g | sed -s s/\;document\.currentScript\.remove.*//g)" 689 + pds_name="${bsky_host^} ($(atfile.util.get_region_pretty "$bsky_region"))" 690 + pds_emoji="๐Ÿ„" 691 + ;; 692 + "at.app.wafrn.net") pds_name="Wafrn"; pds_emoji="๐ŸŒธ" ;; 693 + "atproto.brid.gy") pds_name="Bridgy Fed"; pds_emoji="๐Ÿ”€" ;; 694 + "blacksky.app") pds_name="Blacksky"; pds_emoji="โฌ›" ;; 695 + "pds.sprk.so") pds_name="Spark"; pds_emoji="โœจ" ;; 696 + "tngl.sh") pds_name="Tangled"; pds_emoji="๐Ÿชข" ;; 697 + *) 698 + pds_oauth_url="$pds/oauth/authorize" 699 + pds_oauth_page="$(curl -H "User-Agent: $(atfile.util.get_uas)" -s -L -X GET "$pds_oauth_url" | tr -d '\n')" 700 + pds_customization_data="$(echo "$pds_oauth_page" | sed -n 's/.*window\["__customizationData"\]=JSON.parse("\(.*\)");.*/\1/p' | sed 's/\\"/"/g; s/\\\\/\\/g')" 697 701 698 - if [[ $pds_customization_data == "{"* ]]; then 699 - pds_name="$(echo "$pds_customization_data" | jq -r '.name')" 700 - pds_emoji="๐ŸŸฆ" 701 - else 702 - pds_name="$pds_host" 703 - fi 704 - fi 702 + if [[ $pds_customization_data == "{"* ]]; then 703 + pds_name="$(echo "$pds_customization_data" | jq -r '.name')" 704 + pds_emoji="๐ŸŸฆ" 705 + else 706 + pds_name="$pds_host" 707 + fi 708 + ;; 709 + esac 705 710 706 711 # BUG: Haiku Terminal has issues with emojis 707 712 if [[ -n "$pds_emoji" ]] && [[ $_os != "haiku" ]]; then