Skip to content

Commit 82fca81

Browse files
committed
Merge branch 'hotfix/1.0.7'
2 parents d27c7b8 + 49cd23b commit 82fca81

9 files changed

+63
-31
lines changed

README.md

+13-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Gitd Download Manager Browser Extension
22

3-
It is a browser extension that allows you to download only the files/folders you want without having to download all of the public repository. Github.com, Bitbucket.org, Gitlab.com, Gitea.com provides all of the public repos in git services to download selected files and folders as a zip files with a single click, without the need for any API key or token.
3+
It is a browser extension that allows you to download only the files/folders you want without having to download all of the public repository. Github.com, Bitbucket.org, Gitlab.com, Gitea.com, Gitee.com provides all of the public repos in git services to download selected files and folders as a zip files with a single click, without the need for any API key or token.
44

55
If you see "Gitd Start" button, It is ready for use on every screen you see. You have to to click (checkboxes appears) and can starting to select files.
66

@@ -30,7 +30,7 @@ If you see "Gitd Start" button, It is ready for use on every screen you see. You
3030

3131
- Chrome (Manifestv3)
3232
- Firefox (Manifestv2)
33-
- Microsoft Edge (Manifestv3)
33+
- Microsoft Edge (Manifestv3) (I not login to My Microsoft Account????)
3434

3535
## Installation
3636

@@ -85,7 +85,8 @@ Go to [Gitd Download Manager](https://microsoftedge.microsoft.com/addons/detail/
8585
[Github.com](https://github.com/search/advanced) advanced search page.
8686
[Gitlab.com](https://gitlab.com/explore/projects) advanced search page.
8787
[Bitbucket.org](https://bitbucket.org/repo/all) simple search page.
88-
[Gitea.com](https://gitea.com/explore/repos) simple search page. (NOT SUPPORTED YET)
88+
[Gitea.com](https://gitea.com/explore/repos) simple search page.
89+
[Gitee.com](https://gitee.com/explore) simple search page.
8990

9091
## Licence
9192

@@ -113,12 +114,17 @@ See LICENSE for more details.
113114

114115
## Changelog
115116

117+
v1.0.7
118+
119+
- adds Gitee.com service (archive download not supported)
120+
- fixed file list strange loop index issue
121+
116122
v1.0.6
117123

118-
- add Gitea.com service
119-
- increased selection limit and files
120-
- remove auto initialize all of the services. excepts Github.com
121-
- remove Github.com turbo event listeners
124+
- adds Gitea.com service
125+
- increases selection limit and files
126+
- removes auto initialize all of the services. excepts Github.com
127+
- removes Github.com turbo event listeners
122128

123129
v1.0.5
124130

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.6
1+
1.0.7

extension/background.js

+4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ let urlFilters = {
3131
{
3232
hostEquals:'gitea.com',
3333
schemes:["https"]
34+
},
35+
{
36+
hostEquals:'gitee.com', // https://github.com/git-download-manager/gitd-extension/issues/4
37+
schemes:["https"]
3438
}
3539
]
3640
}

extension/lib/gitdmanager.js

+28-6
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ document.addEventListener('alpine:init', () => {
176176
case "gitea.com":
177177
return "beforebegin"
178178
break;
179+
case "gitee.com":
180+
return "afterbegin"
181+
break;
179182
}
180183

181184
return null
@@ -198,6 +201,9 @@ document.addEventListener('alpine:init', () => {
198201
case "gitea.com":
199202
return document.querySelectorAll("#repo-files-table > tbody > tr > td.name.four.wide > span > svg")
200203
break;
204+
case "gitee.com":
205+
return document.querySelectorAll("#tree-slider > div.row.tree-item > div.five.wide.column.tree-item-file-name.tree-list-item.d-align-center > i")
206+
break;
201207
}
202208

203209
return null
@@ -248,6 +254,16 @@ document.addEventListener('alpine:init', () => {
248254
}
249255
}
250256
break;
257+
case "gitee.com":
258+
itemElement = element
259+
if (!!itemElement) {
260+
if (this._hasClass(itemElement, "icon-folders")) {
261+
itemTypeLabel = "folder-icon"
262+
} else if (this._hasClass(itemElement, "icon-file")) {
263+
itemTypeLabel = "file-icon"
264+
}
265+
}
266+
break;
251267
}
252268

253269
// bitbucket.org item type labels => "Directory," "File," -> epic fail
@@ -282,6 +298,9 @@ document.addEventListener('alpine:init', () => {
282298
case "gitea.com":
283299
return element.parentElement.querySelector("td.name > span > a")
284300
break;
301+
case "gitee.com":
302+
return element.parentElement.querySelector("a")
303+
break;
285304
}
286305

287306
return null
@@ -303,6 +322,9 @@ document.addEventListener('alpine:init', () => {
303322
case "gitea.com":
304323
return "<span role=\"gridcell\" class=\"gitd-tree-checkbox-container\" style=\"padding:5px 10px 5px 0;z-index:1;position:relative;\"><input class=\"gitd-tree-checkbox\" type=\"checkbox\" data-name=\""+itemPath+"\" data-type=\""+itemType+"\" @click=\"toggleSelectList\"></span>"
305324
break;
325+
case "gitee.com":
326+
return "<div role=\"gridcell\" class=\"gitd-tree-checkbox-container\" style=\"padding:5px 10px 5px 0;z-index:1;position:relative;\"><input class=\"gitd-tree-checkbox\" type=\"checkbox\" data-name=\""+itemPath+"\" data-type=\""+itemType+"\" @click=\"toggleSelectList\"></div>"
327+
break;
306328
}
307329

308330
return null
@@ -359,7 +381,7 @@ document.addEventListener('alpine:init', () => {
359381
},
360382

361383
validateGitUrl() {
362-
const regex = /https:\/\/(github\.com|bitbucket\.org|gitlab\.com|gitea\.com)(\S+)(\/|\/([\w#!:.?+=&%@!\-\/]))?/sg;
384+
const regex = /https:\/\/(github\.com|bitbucket\.org|gitlab\.com|gitea\.com|gitee\.com)(\S+)(\/|\/([\w#!:.?+=&%@!\-\/]))?/sg;
363385
this.gitUrlValid = regex.test(this.gitUrl)
364386
},
365387

@@ -615,11 +637,11 @@ document.addEventListener('alpine:init', () => {
615637
_generateSingleFilePath(breadcrumd, filename) {
616638
let path = []
617639
if (breadcrumd.length > 0) {
618-
for (const index in breadcrumd) {
619-
if (index == 0) {
620-
continue
621-
}
622-
path.push(breadcrumd[index])
640+
for (let index = 0; index < breadcrumd.length; index++) {
641+
if (index === 0) {
642+
continue
643+
}
644+
path.push(breadcrumd[index])
623645
}
624646
}
625647

extension/manifest.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"manifest_version": 3,
33
"name": "Gitd Download Manager",
44
"short_name": "Gitd",
5-
"description": "Download at Github,Bitbucket,Gitlab,Gitea repository's selected files, folders as a zip file with a single click, without api token.",
6-
"version": "1.0.6",
5+
"description": "Download at Github,Bitbucket,Gitlab,Gitea,Gitee repository's selected files, folders as a zip file with a single click, without api token.",
6+
"version": "1.0.7",
77
"homepage_url": "https://github.com/git-download-manager/gitd-extension",
88
"permissions": [
99
"webNavigation",
@@ -21,12 +21,12 @@
2121
"offline_enabled": false,
2222
"content_scripts": [
2323
{
24-
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*"],
24+
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*", "*://gitee.com/*"],
2525
"css": ["gitdStyles.css"],
2626
"run_at": "document_end"
2727
},
2828
{
29-
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*"],
29+
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*", "*://gitee.com/*"],
3030
"js": ["contentScript.js"],
3131
"run_at": "document_end"
3232
}
@@ -37,7 +37,7 @@
3737
"web_accessible_resources": [
3838
{
3939
"resources": [ "lib/alpine-scp.min.js","lib/fflate.min.js","lib/gitdmanager.js" ],
40-
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*"]
40+
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*", "*://gitee.com/*"]
4141
}
4242
],
4343
"externally_connectable": {

manifestv2.dev.template

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
"author": "Uretgec",
1919
"content_scripts": [
2020
{
21-
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*"],
21+
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*", "*://gitee.com/*"],
2222
"css": ["gitdStyles.css"],
2323
"run_at": "document_end"
2424
},
2525
{
26-
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*"],
26+
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*", "*://gitee.com/*"],
2727
"js": ["contentScript.js"],
2828
"run_at": "document_end"
2929
}

manifestv2.template

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 2,
33
"name": "Gitd Download Manager",
44
"short_name": "Gitd",
5-
"description": "Download at Github,Bitbucket,Gitlab,Gitea repository's selected files, folders as a zip file with a single click, without api token.",
5+
"description": "Download at Github,Bitbucket,Gitlab,Gitea,Gitee repository's selected files, folders as a zip file with a single click, without api token.",
66
"version": "BUILD_NUMBER",
77
"homepage_url": "https://github.com/git-download-manager/gitd-extension",
88
"permissions": [
@@ -18,12 +18,12 @@
1818
"author": "Uretgec",
1919
"content_scripts": [
2020
{
21-
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*"],
21+
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*", "*://gitee.com/*"],
2222
"css": ["gitdStyles.css"],
2323
"run_at": "document_end"
2424
},
2525
{
26-
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*"],
26+
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*", "*://gitee.com/*"],
2727
"js": ["contentScript.js"],
2828
"run_at": "document_end"
2929
}

manifestv3.dev.template

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
"offline_enabled": false,
2222
"content_scripts": [
2323
{
24-
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*"],
24+
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*", "*://gitee.com/*"],
2525
"css": ["gitdStyles.css"],
2626
"run_at": "document_end"
2727
},
2828
{
29-
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*"],
29+
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*", "*://gitee.com/*"],
3030
"js": ["contentScript.js"],
3131
"run_at": "document_end"
3232
}
@@ -37,7 +37,7 @@
3737
"web_accessible_resources": [
3838
{
3939
"resources": [ "lib/alpine-scp.min.js","lib/fflate.min.js","lib/gitdmanager.js" ],
40-
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*"]
40+
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*", "*://gitee.com/*"]
4141
}
4242
],
4343
"externally_connectable": {

manifestv3.template

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 3,
33
"name": "Gitd Download Manager",
44
"short_name": "Gitd",
5-
"description": "Download at Github,Bitbucket,Gitlab,Gitea repository's selected files, folders as a zip file with a single click, without api token.",
5+
"description": "Download at Github,Bitbucket,Gitlab,Gitea,Gitee repository's selected files, folders as a zip file with a single click, without api token.",
66
"version": "BUILD_NUMBER",
77
"homepage_url": "https://github.com/git-download-manager/gitd-extension",
88
"permissions": [
@@ -21,12 +21,12 @@
2121
"offline_enabled": false,
2222
"content_scripts": [
2323
{
24-
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*"],
24+
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*", "*://gitee.com/*"],
2525
"css": ["gitdStyles.css"],
2626
"run_at": "document_end"
2727
},
2828
{
29-
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*"],
29+
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*", "*://gitee.com/*"],
3030
"js": ["contentScript.js"],
3131
"run_at": "document_end"
3232
}
@@ -37,7 +37,7 @@
3737
"web_accessible_resources": [
3838
{
3939
"resources": [ "lib/alpine-scp.min.js","lib/fflate.min.js","lib/gitdmanager.js" ],
40-
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*"]
40+
"matches": ["*://github.com/*", "*://gitlab.com/*", "*://bitbucket.org/*", "*://gitea.com/*", "*://gitee.com/*"]
4141
}
4242
],
4343
"externally_connectable": {

0 commit comments

Comments
 (0)