feat(moreUserTags): add HTML data attributes to user tags (#883)
Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
parent
db7fc3769b
commit
ca91ef4e39
@ -118,7 +118,7 @@ const settings = definePluginSettings({
|
|||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "MoreUserTags",
|
name: "MoreUserTags",
|
||||||
description: "Adds tags for webhooks and moderative roles (owner, admin, etc.)",
|
description: "Adds tags for webhooks and moderative roles (owner, admin, etc.)",
|
||||||
authors: [Devs.Cyn, Devs.TheSun],
|
authors: [Devs.Cyn, Devs.TheSun, Devs.RyanCaoDev],
|
||||||
settings,
|
settings,
|
||||||
patches: [
|
patches: [
|
||||||
// add tags to the tag list
|
// add tags to the tag list
|
||||||
@ -140,6 +140,11 @@ export default definePlugin({
|
|||||||
{
|
{
|
||||||
match: /(\i)=(\i)===\i\.ORIGINAL_POSTER/,
|
match: /(\i)=(\i)===\i\.ORIGINAL_POSTER/,
|
||||||
replace: "$1=$self.isOPTag($2)"
|
replace: "$1=$self.isOPTag($2)"
|
||||||
|
},
|
||||||
|
// add HTML data attributes (for easier theming)
|
||||||
|
{
|
||||||
|
match: /children:\[(?=\i,\(0,\i\.jsx\)\("span",{className:\i\(\)\.botText,children:(\i)}\)\])/,
|
||||||
|
replace: "'data-tag':$1.toLowerCase(),children:["
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -258,8 +258,12 @@ export const Devs = /* #__PURE__*/ Object.freeze({
|
|||||||
name: "pylix",
|
name: "pylix",
|
||||||
id: 492949202121261067n
|
id: 492949202121261067n
|
||||||
},
|
},
|
||||||
|
RyanCaoDev: {
|
||||||
|
name: "RyanCaoDev",
|
||||||
|
id: 952235800110694471n,
|
||||||
|
},
|
||||||
Strencher: {
|
Strencher: {
|
||||||
name: "Strencher",
|
name: "Strencher",
|
||||||
id: 415849376598982656n
|
id: 415849376598982656n
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user