diff options
author | ManeraKai <manerakai@protonmail.com> | 2023-05-31 21:00:30 +0300 |
---|---|---|
committer | ManeraKai <manerakai@protonmail.com> | 2023-05-31 21:00:30 +0300 |
commit | ecdb4466ef94480c77c693e2853e97a85e57c396 (patch) | |
tree | 8c3b746af0cce49a33ab8280cafeda2f1950f750 | |
parent | Added Export/Import Settings Sync https://github.com/libredirect/browser_exte... (diff) | |
download | libredirect-ecdb4466ef94480c77c693e2853e97a85e57c396.zip |
Added Laboratory https://github.com/libredirect/browser_extension/issues/723
-rw-r--r-- | src/assets/images/gitlab-icon.svg | 1 | ||||
-rw-r--r-- | src/assets/javascripts/services.js | 6 | ||||
-rw-r--r-- | src/config.json | 23 |
3 files changed, 30 insertions, 0 deletions
diff --git a/src/assets/images/gitlab-icon.svg b/src/assets/images/gitlab-icon.svg new file mode 100644 index 00000000..2c218a2b --- /dev/null +++ b/src/assets/images/gitlab-icon.svg @@ -0,0 +1 @@ +<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m24.507 9.5-.034-.09L21.082.562a.896.896.0 00-1.694.091l-2.29 7.01H7.825L5.535.653A.898.898.0 003.841.563L.451 9.411.416 9.5a6.297 6.297.0 002.09 7.278l.012.01.03.022 5.16 3.867 2.56 1.935 1.554 1.176a1.051 1.051.0 001.268.0l1.555-1.176 2.56-1.935 5.197-3.89.014-.01A6.297 6.297.0 0024.507 9.5z" fill="#e24329"/><path d="m24.507 9.5-.034-.09a11.44 11.44.0 00-4.56 2.051l-7.447 5.632 4.742 3.584 5.197-3.89.014-.01A6.297 6.297.0 0024.507 9.5z" fill="#fc6d26"/><path d="m7.707 20.677 2.56 1.935 1.555 1.176a1.051 1.051.0 001.268.0l1.555-1.176 2.56-1.935-4.743-3.584-4.755 3.584z" fill="#fca326"/><path d="M5.01 11.461A11.43 11.43.0 00.45 9.411L.416 9.5a6.297 6.297.0 002.09 7.278l.012.01.03.022 5.16 3.867 4.745-3.584-7.444-5.632z" fill="#fc6d26"/></svg> \ No newline at end of file diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index 0da2bfa5..a5e6a965 100644 --- a/src/assets/javascripts/services.js +++ b/src/assets/javascripts/services.js @@ -547,6 +547,11 @@ function redirect(url, type, initiator, forceRedirection) { if (url.hostname == "i.pinimg.com") return `${randomInstance}/image_proxy.php?url=${url.href}` return randomInstance } + case "laboratory": { + let path = url.pathname + if (path == "/") path = "" + return `${randomInstance}/${url.hostname}${path}${url.search}` + } default: { return `${randomInstance}${url.pathname}${url.search}` } @@ -684,6 +689,7 @@ const defaultInstances = { 'mikuInvidious': ['https://mikuinv.resrv.org'], "tent": ['https://tent.sny.sh'], "wolfreeAlpha": ['https://gqq.gitlab.io', 'https://uqq.gitlab.io'], + "laboratory": ['https://lab.vern.cc'], "libreSpeed": ['https://librespeed.org'], 'jitsi': ['https://meet.jit.si', 'https://8x8.vc'], 'binternet': ['https://binternet.ahwx.org'] diff --git a/src/config.json b/src/config.json index e82cc61f..a465f62e 100644 --- a/src/config.json +++ b/src/config.json @@ -761,6 +761,29 @@ "embeddable": false, "url": "https://bandcamp.com" }, + "gitlab": { + "frontends": { + "laboratory": { + "name": "Laboratory", + "instanceList": true, + "url": "https://git.vitali64.duckdns.org/utils/laboratory.git/about/" + } + }, + "targets": [ + "^https?:\\/{2}gitlab\\.com\\/", + "^https?:\\/{2}gitlab\\.freedesktop\\.com\\/", + "^https?:\\/{2}gitlab\\.archlinux\\.com\\/" + ], + "name": "Gitlab", + "options": { + "enabled": false, + "unsupportedUrls": "bypass", + "frontend": "laboratory" + }, + "imageType": "svg", + "embeddable": false, + "url": "https://gitlab.com/" + }, "wolframAlpha": { "frontends": { "wolfreeAlpha": { |