Skip to content
Snippets Groups Projects
Commit 8f9d126f authored by jurgenhaas's avatar jurgenhaas
Browse files

Adjust selectors for projectIds and issue ID

parent 90fe1c0f
No related branches found
No related tags found
No related merge requests found
...@@ -17,12 +17,11 @@ ...@@ -17,12 +17,11 @@
// ==/UserScript== // ==/UserScript==
new TogglButtonGM('.issue-details', function (elem) { new TogglButtonGM('.issue-details', function (elem) {
var description, projectIds = [], var description, projectIds = [], tags = [],
id = document.querySelector('.detail-page-header .identifier'), id = document.querySelector('.breadcrumbs-sub-title'),
titleElem = elem.querySelector('.issue-details h2.title'), titleElem = elem.querySelector('.issue-details h2.title'),
projectElem = document.querySelector('.breadcrumbs-links > div.title'), projectElem = document.querySelectorAll('.breadcrumb-item-text'),
tagsElem = document.querySelector('.block.labels .has-labels'), tagsElem = document.querySelector('.block.labels .has-labels');
tags = [];
description = titleElem.textContent.trim(); description = titleElem.textContent.trim();
if (id !== null) { if (id !== null) {
...@@ -30,7 +29,9 @@ new TogglButtonGM('.issue-details', function (elem) { ...@@ -30,7 +29,9 @@ new TogglButtonGM('.issue-details', function (elem) {
} }
if (projectElem !== null) { if (projectElem !== null) {
projectIds.push(projectElem.textContent.trim()); for (var i = 0, element; element = projectElem[i]; i++) {
projectIds.push(element.textContent.trim());
}
} }
if (tagsElem !== null) { if (tagsElem !== null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment