Bugfix for ShowFeedID button (#333)

This commit is contained in:
Inverle 2025-06-09 08:59:29 +02:00 committed by GitHub
parent 1126dfe7e9
commit f56aa0a387
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View file

@ -2,7 +2,7 @@
"name": "ShowFeedID", "name": "ShowFeedID",
"author": "math-GH, Inverle", "author": "math-GH, Inverle",
"description": "Show the ID of feed and category", "description": "Show the ID of feed and category",
"version": "0.4.1", "version": "0.4.2",
"entrypoint": "ShowFeedID", "entrypoint": "ShowFeedID",
"type": "user" "type": "user"
} }

View file

@ -4,7 +4,12 @@ window.addEventListener("load", function () {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
const i18n = context.extensions.showfeedid_i18n; const i18n = context.extensions.showfeedid_i18n;
const div = document.querySelector('h1 ~ div'); let div = document.querySelector('h1 ~ div');
if (div.classList.contains('drop-section')) {
div = document.createElement('div');
document.querySelector('h1').after(div);
}
const button = document.createElement('a'); const button = document.createElement('a');
button.classList.add('btn'); button.classList.add('btn');