mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
feat: support enterprise
This commit is contained in:
parent
c0d75c2ed3
commit
6f83adf934
5 changed files with 79 additions and 2 deletions
|
|
@ -39,6 +39,8 @@
|
|||
"react-use": "^13.8.0",
|
||||
"react-window": "^1.8.5",
|
||||
"styled-components": "^5.0.1",
|
||||
"webext-domain-permission-toggle": "^1.0.0",
|
||||
"webext-dynamic-content-scripts": "^6.0.3",
|
||||
"webextension-polyfill": "^0.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
7
src/background.ts
Normal file
7
src/background.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import addDomainPermissionToggle from 'webext-domain-permission-toggle'
|
||||
import 'webext-dynamic-content-scripts'
|
||||
|
||||
addDomainPermissionToggle({
|
||||
title: 'Enable Gitako on this domain',
|
||||
reloadOnSuccess: 'Refresh to activate Gitako?',
|
||||
})
|
||||
|
|
@ -6,8 +6,15 @@
|
|||
"128": "icons/Gitako-128.png",
|
||||
"256": "icons/Gitako-256.png"
|
||||
},
|
||||
"permissions": ["storage", "*://*.github.com/*", "*://*.sentry.io/*"],
|
||||
"permissions": ["storage", "contextMenus", "activeTab", "*://*.github.com/*"],
|
||||
"optional_permissions": ["http://*/*", "https://*/*"],
|
||||
"web_accessible_resources": ["icons/vscode/*", "content.css"],
|
||||
"background": {
|
||||
"scripts": ["background.js"]
|
||||
},
|
||||
"browser_action": {
|
||||
"default_icon": "icons/Gitako.png"
|
||||
},
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": ["https://github.com/*"],
|
||||
|
|
|
|||
|
|
@ -61,8 +61,9 @@ plugins.push(
|
|||
module.exports = {
|
||||
entry: {
|
||||
content: './src/content.tsx',
|
||||
background: './src/background.ts',
|
||||
},
|
||||
devtool: IN_PRODUCTION_MODE ? 'source-map' : 'eval-source-map',
|
||||
devtool: IN_PRODUCTION_MODE ? 'source-map' : 'inline-source-map',
|
||||
mode: IN_PRODUCTION_MODE ? 'production' : 'development',
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
|
|
|
|||
60
yarn.lock
60
yarn.lock
|
|
@ -1265,11 +1265,35 @@
|
|||
"@testing-library/dom" "^6.11.0"
|
||||
"@types/testing-library__react" "^9.1.2"
|
||||
|
||||
"@types/chrome@0.0.86":
|
||||
version "0.0.86"
|
||||
resolved "https://registry.yarnpkg.com/@types/chrome/-/chrome-0.0.86.tgz#1026ef8e76db4fde1859cae858d73236fe670d69"
|
||||
integrity sha512-7ehebPf/5IR64SYdD2Vig0q0oUCNbWMQ29kASlNJaHVVtA5/J/DnrxnYVPCID70o7LgHdYsav6I4/XdqAxjTLQ==
|
||||
dependencies:
|
||||
"@types/filesystem" "*"
|
||||
|
||||
"@types/color-name@^1.1.1":
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
|
||||
integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==
|
||||
|
||||
"@types/filesystem@*":
|
||||
version "0.0.29"
|
||||
resolved "https://registry.yarnpkg.com/@types/filesystem/-/filesystem-0.0.29.tgz#ee3748eb5be140dcf980c3bd35f11aec5f7a3748"
|
||||
integrity sha512-85/1KfRedmfPGsbK8YzeaQUyV1FQAvMPMTuWFQ5EkLd2w7szhNO96bk3Rh/SKmOfd9co2rCLf0Voy4o7ECBOvw==
|
||||
dependencies:
|
||||
"@types/filewriter" "*"
|
||||
|
||||
"@types/filewriter@*":
|
||||
version "0.0.28"
|
||||
resolved "https://registry.yarnpkg.com/@types/filewriter/-/filewriter-0.0.28.tgz#c054e8af4d9dd75db4e63abc76f885168714d4b3"
|
||||
integrity sha1-wFTor02d11205jq8dviFFocU1LM=
|
||||
|
||||
"@types/firefox-webext-browser@^67.0.2":
|
||||
version "67.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@types/firefox-webext-browser/-/firefox-webext-browser-67.0.2.tgz#04625d3294fbca54bccf42dae43f636c5b6452a2"
|
||||
integrity sha512-tXR5THtH5Fqwfmi4y/2dTxCTebqHsKCH2bif/VdE5CPcB/S5x5fu+N+wBuMENzN41agovHMU/LQbtWNV+Aux+w==
|
||||
|
||||
"@types/firefox-webext-browser@^70.0.1":
|
||||
version "70.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/firefox-webext-browser/-/firefox-webext-browser-70.0.1.tgz#53a3915bfbe25e2c5ec439dbdbe6e303610012bb"
|
||||
|
|
@ -2939,6 +2963,13 @@ content-disposition@0.5.3:
|
|||
dependencies:
|
||||
safe-buffer "5.1.2"
|
||||
|
||||
content-scripts-register-polyfill@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/content-scripts-register-polyfill/-/content-scripts-register-polyfill-1.0.0.tgz#21bc2df475ea48aa83737d24675a6a44e4a006a7"
|
||||
integrity sha512-DiHscMTyL5evEg6C8GSkkd5Kfkma726zxqIt+zv6L2W/gVqYOUZUw2F27BpAUp9nQZnIrky5Gx1eYA9Fw4+aeA==
|
||||
dependencies:
|
||||
"@types/firefox-webext-browser" "^67.0.2"
|
||||
|
||||
content-type@~1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
|
||||
|
|
@ -9159,6 +9190,35 @@ web-ext@^3.2.0:
|
|||
yargs "13.3.0"
|
||||
zip-dir "1.0.2"
|
||||
|
||||
webext-additional-permissions@^0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.yarnpkg.com/webext-additional-permissions/-/webext-additional-permissions-0.1.0.tgz#bc5a2a6cb8e60098c81a6004c446bfae2aefd85a"
|
||||
integrity sha512-eA1o6BdRbpU5ClL6GcmwhGtVVzNTbQSqX9esakpurWYVt9ykpGQ1ZNe5l30Yt19GW0eRC8VdroOeJSumP5cMpQ==
|
||||
dependencies:
|
||||
"@types/chrome" "0.0.86"
|
||||
|
||||
webext-domain-permission-toggle@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/webext-domain-permission-toggle/-/webext-domain-permission-toggle-1.0.0.tgz#6f9a6d3234ffe596921d1be5ae8823ef5b02ebd2"
|
||||
integrity sha512-K6RAOYtVCMAmqjQPopMbGOIoxpFU05ERGgaLkUNvFCdpPsXLB5y4m1+Cq1dezyfx6FU0lLEqxoL/5/49+EY5zA==
|
||||
dependencies:
|
||||
webext-additional-permissions "^0.1.0"
|
||||
|
||||
webext-dynamic-content-scripts@^6.0.3:
|
||||
version "6.0.3"
|
||||
resolved "https://registry.yarnpkg.com/webext-dynamic-content-scripts/-/webext-dynamic-content-scripts-6.0.3.tgz#729a5cf4408dca589af889cb403943ab414c2ecd"
|
||||
integrity sha512-MIH4UOnkUl4hapl83uMQT5t2bbYXTPO/mxhFFBcesm2mGvnG3OrNKNiaPRFL6AdcPvqDVae8UcWcWHSflptLTQ==
|
||||
dependencies:
|
||||
"@types/chrome" "0.0.86"
|
||||
content-scripts-register-polyfill "^1.0.0"
|
||||
webext-additional-permissions "^0.1.0"
|
||||
webext-permissions-events-polyfill "^1.0.1"
|
||||
|
||||
webext-permissions-events-polyfill@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/webext-permissions-events-polyfill/-/webext-permissions-events-polyfill-1.0.1.tgz#c5108d140b03efbd06b34c7211694b8cde928177"
|
||||
integrity sha512-dPsU7KtDn+OG+mPy0LLc9UhMXdVeQ8ywD5kK1GFtvceur4IWOnpI5D4uTjMPrKm8+re/8cbHKwVjnviIA9wZ3Q==
|
||||
|
||||
webextension-polyfill@^0.5.0:
|
||||
version "0.5.0"
|
||||
resolved "https://registry.yarnpkg.com/webextension-polyfill/-/webextension-polyfill-0.5.0.tgz#795e0bf6a2b8eadcdb6edaecd169e9228c747519"
|
||||
|
|
|
|||
Loading…
Reference in a new issue