├── LICENSE ├── README.md ├── favicon.ico ├── index.html ├── justfile ├── lib ├── tailwind-license ├── tailwind.min.css ├── vue-license ├── vue.global.js └── vue.global.prod.js ├── mastodon.js ├── script.js └── scripts └── build-netlify.sh /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2022, Julia Evans 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # mastodon threaded replies 2 | 3 | Shows you replies to a Mastodon post of yours in a threaded reply style, kind of like a Reddit comment thread. 4 | 5 | The website is here: https://mastodon-thread-view.jvns.ca 6 | 7 | ### no server 8 | 9 | This is a static site: there's no server, all your data is stored only in your 10 | browser, as soon as you clear your cache it's all gone. 11 | 12 | I've tested it with my personal mastodon server, it may or may not work with other Mastodon instances. 13 | 14 | ### this code is unmaintained 15 | 16 | I made this site just for me to use, it's fulfilled its purpose for me, and 17 | I'm not planning to take feature requests or fix bugs. I would genuinely love 18 | to hear about problems (and I might even fix them! who knows!) but I want to be 19 | clear that there's a high probability that I will not respond :) 20 | 21 | It's MIT licensed so you can use it however you want. 22 | 23 | ### how to develop it 24 | 25 | To develop this locally, run: 26 | 27 | ``` 28 | python3 -m http.server 8081 29 | ``` 30 | 31 | Then open http://localhost:8081 in your browser. 32 | 33 | ### contains a tiny Mastodon library 34 | 35 | This contains a tiny Mastodon library called `mastodon.js` for logging in with 36 | OAuth and making requests. You can see some examples of how to use it in `script.js`. 37 | 38 | I also probably won't be fixing bugs or taking feature requests for that library. 39 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/mastodon-threaded-replies/c668af99e5703937b97a3a93364c936b2e4e5507/favicon.ico -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |139 | Hello! This is a tool to let you view replies to your toots in a 140 | Reddit comment thread-like interface. It's read-only, and your data 141 | isn't stored on a server: everything stays in your browser. 142 |
143 | 144 |u?J(e,r,s,!0,!1,p):N(t,n,o,r,s,i,l,c,p)},U=(e,t,n,o,r,s,i,l,c)=>{let a=0;const u=t.length;let p=e.length-1,f=u-1;for(;a<=p&&a<=f;){const o=e[a],u=t[a]=c?jr(t[a]):Lr(t[a]);if(!Or(o,u))break;m(o,u,n,null,r,s,i,l,c),a++}for(;a<=p&&a<=f;){const o=e[p],a=t[f]=c?jr(t[f]):Lr(t[f]);if(!Or(o,a))break;m(o,a,n,null,r,s,i,l,c),p--,f--}if(a>p){if(a<=f){const e=f+1,p=ef)for(;a<=p;)H(e[a],r,s,!0),a++;else{const d=a,h=a,g=new Map;for(a=h;a<=f;a++){const e=t[a]=c?jr(t[a]):Lr(t[a]);null!=e.key&&g.set(e.key,a)}let y,b=0;const _=f-h+1;let S=!1,x=0;const C=new Array(_);for(a=0;a<_;a++)C[a]=0;for(a=d;a<=p;a++){const o=e[a];if(b>=_){H(o,r,s,!0);continue}let u;if(null!=o.key)u=g.get(o.key);else for(y=h;y<=f;y++)if(0===C[y-h]&&Or(o,t[y])){u=y;break}void 0===u?H(o,r,s,!0):(C[u-h]=a+1,u>=x?x=u:S=!0,m(o,t[u],n,null,r,s,i,l,c),b++)}const w=S?function(e){const t=e.slice(),n=[0];let o,r,s,i,l;const c=e.length;for(o=0;o