+71
-4
index.html
+71
-4
index.html
···
90
90
},
91
91
];
92
92
93
+
window.regionalModAccounts = [ // https://github.com/mary-ext/atproto-scraping?tab=readme-ov-file#bluesky-labelers
94
+
'https://mod-br.bsky.app',
95
+
'https://mod-de.bsky.app',
96
+
'https://mod-in.bsky.app',
97
+
'https://mod-ru.bsky.app',
98
+
'https://mod-tr.bsky.app',
99
+
];
100
+
101
+
window.bskyAccountDeathLabels = {
102
+
['needs-review']: 'Automated action, cleared by manual review from Bluesky moderation team. Your content can ve accessed via direct links on Bluesky, but invisible in feeds and replies to posts.',
103
+
['!suspend']: 'Moderation action from Bluesky moderation team. Makes your content inaccessible on the Bluesky app.',
104
+
['!takedown']: 'Moderation action from Bluesky moderation team. Makes your content inaccessible on the Bluesky app.',
105
+
['!hide']: 'Almost always used with !takedown, makes your content inaccessible on the Bluesky app.',
106
+
// other labels shouldn't cause problems that make you think your pds is broken
107
+
// 'spam': just hides replies by default + makes your posts click-through
108
+
// 'intolerant', etc: similar to spam
109
+
};
110
+
93
111
if (window.blehYeahReady) blehYeahReady();
94
112
else window.yeahBlehIsReady = true;
95
113
</script>
···
503
521
Alpine.data('modLabels', did => ({
504
522
loading: false,
505
523
error: null,
524
+
regionalErrors: [],
506
525
labels: [],
507
526
508
527
async init() {
509
528
this.loading = true;
510
529
this.error = null;
530
+
this.regionalErrors = [];
511
531
this.labels = [];
512
532
513
533
const query = window.SimpleQuery('https://mod.bsky.app');
···
518
538
});
519
539
this.labels = res.labels ?? [];
520
540
// TODO: handle cursors?
541
+
542
+
for (const region of window.regionalModAccounts) {
543
+
// intentionally no await, these come in async
544
+
// (...and could get messy if we start re-checking labels before they're done)
545
+
this.checkRegionLabels(region);
546
+
}
521
547
} catch (e) {
522
548
if (window.isXrpcErr(e)) {
523
549
this.error = e.error;
···
528
554
}
529
555
this.loading = false;
530
556
},
557
+
558
+
async checkRegionLabels(labeler) {
559
+
const query = window.SimpleQuery(labeler);
560
+
try {
561
+
const res = await query('com.atproto.label.queryLabels', {
562
+
params: { uriPatterns: [did] },
563
+
});
564
+
if (res?.labels?.length > 0) this.labels.push(...res.labels);
565
+
} catch (e) {
566
+
if (window.isXrpcErr(e)) {
567
+
this.regionalErrors.push(`${labeler}: ${e.error}`);
568
+
} else {
569
+
this.regionalErrors.push(`Failed to check ${labeler} (see console)`);
570
+
console.error(`labeler: ${labeler}`, e);
571
+
}
572
+
}
573
+
}
531
574
}));
532
575
533
576
Alpine.data('pdsHistory', (did, currentPds) => ({
···
1015
1058
</template>
1016
1059
<template x-if="!loading && !error && labels.length === 0">
1017
1060
<tr>
1018
-
<td class="text-sm">
1019
-
<em>no labels applied by mod.bsky.app</em>
1061
+
<td class="text-xs">
1062
+
<em>No Bluesky moderation labels found</em>
1020
1063
</td>
1021
1064
</tr>
1022
1065
</template>
···
1043
1086
<code
1044
1087
x-text="label.val"
1045
1088
class="badge badge-sm badge-soft"
1046
-
:class="(label.neg || expired) ? 'badge-neutral line-through' : 'badge-warning'"
1089
+
:class="(label.neg || expired)
1090
+
? 'badge-neutral line-through'
1091
+
: !!window.bskyAccountDeathLabels[label.val]
1092
+
? 'badge-warning'
1093
+
: 'badge-info'"
1047
1094
:title="label.neg
1048
1095
? 'label negated'
1049
1096
: expired
1050
1097
? 'label expired'
1051
-
: ''"
1098
+
: window.bskyAccountDeathLabels[label.val] ?? ''"
1052
1099
></code>
1053
1100
</td>
1101
+
<td
1102
+
x-data="didToHandle(label.src)"
1103
+
x-intersect:enter.once="load"
1104
+
>
1105
+
<span x-show="loading">Loading…</span>
1106
+
<span x-show="error !== null" x-text="error"></span>
1107
+
<a
1108
+
href="#"
1109
+
class="link"
1110
+
@click.prevent="goto(handle)"
1111
+
x-show="handle !== null"
1112
+
x-text="`@${handle}`"
1113
+
></a>
1114
+
</td>
1054
1115
</tr>
1055
1116
</template>
1056
1117
</template>
1057
1118
</tbody>
1058
1119
</table>
1059
1120
</div>
1121
+
<template x-for="error in regionalErrors">
1122
+
<p
1123
+
x-text="error"
1124
+
class="text-xs text-warning"
1125
+
></p>
1126
+
</template>
1060
1127
</div>
1061
1128
1062
1129
<template x-if="did.startsWith('did:plc:')">
+13
useful-accounts.txt
+13
useful-accounts.txt
···
1
+
some accounts that show things useful for testing the debugger
2
+
3
+
4
+
Labels
5
+
6
+
- did:plc:bnwrgnvwkg2n5cbvk4xodb3h | !hide | no other labels
7
+
- did:plc:qhl3vg5tmwey536z2fil2lrh | !hide | from moderation-tr.bsky.app
8
+
- did:plc:fsmaoqqnm6knqh4cuphb4jow | !hide, ~!takedown | takedown negated
9
+
- did:plc:iv3yod6zf2j4zaakq6qyiz46 | !takedown |
10
+
- did:plc:nwrcwcrhpkgrqqvkg3lmaqky | ~needs-review, ~!takedown | both negated
11
+
- did:plc:2tinwgqvf4asiwh36ii6ko7l | needs-review | expired
12
+
- did:plc:5plqrpw3x6j5wzaosssqams7 | spam | no other labels
13
+
- did:plc:tqww7jdpqx5tb3w435fugmxi | intolerant |