Bugfix for ShowFeedID button (#333)
This commit is contained in:
parent
1126dfe7e9
commit
f56aa0a387
2 changed files with 7 additions and 2 deletions
|
|
@ -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"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue