Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

Commit 448c0eb

Browse files
committed
Continue
1 parent 84ec713 commit 448c0eb

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ A browser extension that enhance all Merge Requests lists on any instance of Git
2828

2929
## Prerequisites
3030

31-
- **GitLab**: 9.0 or above or GitLab.com (this addon requires GitLab API v4)
31+
- **GitLab**: the latest available version of GitLab or GitLab.com
3232
- **Firefox**: >= 63 (because this extension uses the `clipboard.writeText` API)
3333
- **Chrome**: >= 66 (because this extension uses the `clipboard.writeText` API)
3434

@@ -57,6 +57,10 @@ It would be great, however the extension has no reliable way to do that due to a
5757

5858
That was the initial idea for the 1.6 release, however it's not possible due to a technical GitLab limitation.
5959

60+
- Some feature looks broken on GitLab version [old version of GitLab]. Can you please fix that?
61+
62+
Nope. I don't want to deal with old versions of GitLab. Too much work.
63+
6064
## Changelog
6165

6266
See [here](https://github.com/EpocDotFr/gitlab-merge-requests-lists-enhancer/releases).

js/content.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131

132132
this.baseUrl = location.protocol + '//' + location.host;
133133
this.baseApiUrl = this.baseUrl + '/api/v4/';
134+
this.baseIconsUrl = this.getBaseIconsUrl();
134135
this.userAuthenticated = this.isUserAuthenticated();
135136
this.pipelineFeatureEnabled = this.isPipelineFeatureEnabled();
136137
this.apiClient = new GitLabApiClient(this.baseApiUrl, this.getCsrfToken());
@@ -185,6 +186,19 @@
185186
return document.querySelector('.navbar-nav .header-user') ? true : false;
186187
}
187188

189+
/**
190+
* Return the base URL to the SVG icons file.
191+
*/
192+
getBaseIconsUrl() {
193+
let svgUse = document.querySelector('svg.s16 > use');
194+
195+
if (!svgUse) {
196+
return null;
197+
}
198+
199+
// return new Url(svgUse.href);
200+
}
201+
188202
/**
189203
* Determines if the project do uses the Gitlab "pipeline" feature.
190204
*/
@@ -584,7 +598,9 @@
584598
* Generate the HTML code corresponding to an SVG icon.
585599
*/
586600
buildSpriteIcon(iconName) {
587-
return '';
601+
return '<svg class="s16" data-testid="' + iconName + '-icon">' +
602+
'<use xlink:href="' this.getBaseIconsUrl + '/assets/icons-795a2ef2fd636a0538bbef3b8d2787dd90927b42d7617fdda8620930016b333d.svg#' + iconName + '"></use>' +
603+
'</svg>';
588604
}
589605

590606
addHideMrsByPipelineStatusMenu() {

scripts/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
MANIFEST_FILE = {
22
'manifest_version': 2,
33
'name': 'GitLab Merge Requests lists enhancer',
4-
'version': '1.6.0',
4+
'version': '1.5.1',
55
'description': 'An extension that enhance all Merge Requests lists on any instance of Gitlab and GitLab.com.',
66
'homepage_url': 'https://github.com/EpocDotFr/gitlab-merge-requests-lists-enhancer',
77
'author': 'Maxime \'Epoc\' G.',

0 commit comments

Comments
 (0)