forked from Tylian/XKit
-
Notifications
You must be signed in to change notification settings - Fork 131
Open
Description
XKit/Extensions/xkit_patches.js
Lines 970 to 997 in 13a0fa4
| get_control_button_template: async function() { | |
| await XKit.css_map.getCssMap(); | |
| var selector = XKit.css_map.keyToClasses("controlIcon").map(css => `[data-id]:first footer .${css}:first`).join(", "); | |
| var control = $(selector); | |
| var get_used_class_from_map = function(key) { | |
| const keyCss = XKit.css_map.keyToCss(key); | |
| var element = control.find(keyCss); | |
| return element.attr("class"); | |
| }; | |
| var controlIconClass = control.attr("class"); | |
| var buttonClass = get_used_class_from_map("button"); | |
| var new_control = ` | |
| <div class="${controlIconClass} {{className}} xkit-interface-control-button" title="{{text}}" {{additional}}> | |
| <button class="${buttonClass}" aria-label="" tabindex="0"> | |
| <div class="xkit-interface-icon" {{data}}></div> | |
| </button> | |
| </div> | |
| `; | |
| this.control_button_template = new_control; | |
| return this.control_button_template; | |
| }, |
[data-id]:first footer will not match anything in this code if the first post loaded by the user is a filtered post, which makes "controlIconClass" and "buttonClass" equal to the string 'undefined', which makes post controls look like this:
I assume there's no point in me reporting this, really, since this codebase is super dead and I would be the one fixing it if anyone would, but hey.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels