Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gitlab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Toggl Button for Firefox
gitlab
Commits
9935c82c
Commit
9935c82c
authored
8 years ago
by
jurgenhaas
Browse files
Options
Downloads
Plain Diff
Merge branch 'release/v1.3'
parents
79939a21
88764866
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+5
-0
5 additions, 0 deletions
README.md
gitlab.user.js
+15
-5
15 additions, 5 deletions
gitlab.user.js
with
20 additions
and
5 deletions
README.md
0 → 100644
+
5
−
0
View file @
9935c82c
# Toggl Button for Greasemonkey/Firefox: GitLab
This is a plugin for the
[
Core Toggl Button
][
1
]
and should go there for instructions on how to install, configure and use this system.
[
1
]:
https://gitlab.paragon-es.de/toggl-button/core
This diff is collapsed.
Click to expand it.
gitlab.user.js
+
15
−
5
View file @
9935c82c
// ==UserScript==
// @name Toggl-Button Gitlab
// @namespace https://gitlab.paragon-es.de/toggl-button
// @version 1.
2
// @version 1.
3
// @include http*://gitlab.com/*
// @include http*://gitlab.*/*
// @grant GM_xmlhttpRequest
...
...
@@ -18,9 +18,11 @@
new
TogglButtonGM
(
'
.issue-details
'
,
function
(
elem
)
{
var
description
,
projectIds
=
[],
id
=
elem
.
querySelector
(
'
.page-title .issue-id
'
),
titleElem
=
elem
.
querySelector
(
'
.issue-box .title, .issue-title
'
),
projectElem
=
document
.
querySelector
(
'
.title
'
);
id
=
document
.
querySelector
(
'
.detail-page-header .identifier
'
),
titleElem
=
elem
.
querySelector
(
'
.issue-details h2.title
'
),
projectElem
=
document
.
querySelector
(
'
h1.title
'
),
tagsElem
=
document
.
querySelector
(
'
.block.labels .has-labels
'
),
tags
=
[];
description
=
titleElem
.
textContent
.
trim
();
if
(
id
!==
null
)
{
...
...
@@ -31,9 +33,17 @@ new TogglButtonGM('.issue-details', function (elem) {
projectIds
.
push
(
projectElem
.
textContent
.
trim
());
}
if
(
tagsElem
!==
null
)
{
var
elements
=
tagsElem
.
querySelectorAll
(
'
a span
'
);
for
(
var
i
=
0
,
element
;
element
=
elements
[
i
];
i
++
)
{
tags
.
push
(
element
.
textContent
.
trim
());
}
}
return
{
className
:
'
gitlab
'
,
description
:
description
,
projectIds
:
projectIds
projectIds
:
projectIds
,
tags
:
tags
};
});
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment