From 18bd1195b9b465b1f4aeddb349f16183970c08c6 Mon Sep 17 00:00:00 2001 From: hir-suzuki Date: Thu, 12 Oct 2017 11:01:44 +0900 Subject: [PATCH] [add] adding github enterprise plug-in --- github-enterprise/icon.png | Bin 0 -> 6705 bytes github-enterprise/icon.svg | 1 + github-enterprise/index.js | 1 + github-enterprise/package.json | 24 ++++++++++++++++++++++++ github-enterprise/webview.js | 15 +++++++++++++++ 5 files changed, 41 insertions(+) create mode 100755 github-enterprise/icon.png create mode 100755 github-enterprise/icon.svg create mode 100755 github-enterprise/index.js create mode 100755 github-enterprise/package.json create mode 100755 github-enterprise/webview.js diff --git a/github-enterprise/icon.png b/github-enterprise/icon.png new file mode 100755 index 0000000000000000000000000000000000000000..0a3c5e01661613989fa6d05c53ad0c439cbff2d1 GIT binary patch literal 6705 zcmV-18qVd3P)HRkg=|Yn{w9Co{C= zRa$Imlguz)K$#>{?0`SAIa$=YkJiOzIJ5T@0vbT28b9Ke>pBb(hZY5tVK^ay~? z&Om5W{$vHeOM$mD&^*~Ljfbeb#6-7(^m?nW=Yh%g#|u+B0GcDQB|>xogx&|n{K@vG z6a<hF{7%Lr2<0D_U&>p^@a1BnSVt0IyELm6xW;E6LW zs|57rd^&Z{#MvC5NezHdYdk8V-)8Vz{M0KzKY%_`?E}yUrapt{86gbVBvufOxy@_3 z@&I&X%>4Q7jRW<8kiirppvh)?5eO{`Y5}AbiWVlG_^2|53si51;M>-^ z)Pue|R|T4)vABXR0q9JW^{XJO3L1F#w#-8teRpmYRSy8OC2_ji`ZH!SOByIrP{xf= zIMLZBC)GM{HfB0i4E{i z8Mt~Xub`E}oF(nADj3G6q4Gg62TB;KfL?8-Q-i)(~oxUjaC+lwktx zR?!a+W_uo~ieHmVuw~g1Y|9V8IJT5=s`yo|$$mdpuO9Z>C*K3WjJEHuF#c4^qK=4c zC8E#dGN~VfCIb^QpI0`4cp)O!sCzUeRal9WsR*z&o_ks25_6# zF$%p2kdNllt6%ifm#I$k5y#E3cMN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`87Sp2i2}GHmr0&i>1@9k)$ACeRyy^01>R9=zCQzRCDNxt;n;7z)+8X+ z>YoSPg|K+KRRvo*mYdPoUq!SB#HF5f+)RQuS?S~#P{pDd6EXu2wZ@|=xQReVm!&}E zUa)bkb#VQi=;|trez~b_*<39YHUK;!E$IX@&}8ZSO`BGaEpFA;R%_bksj9eyfn&-v z(N&X{*?ygXZhZqCjp?b_2~I5#xDqTvX9=n zqR^Wf0*xOWskPG>NgTz5^HuO3X6Igv4hVp&c5dmGwyRez6aEZtMmvrp(d)oyb(b!V zh&&7M5VI_uxUAsOJ|NGGw217-%!gH|?J*E8EafnVA56|7OgLN@qB)-f(Wgw^)i1dvZA=7HA^=8cYKgzmR=T``+4Gb}1%D<(u9)ciyc1I@07fvQ?Z=YP zrC>f4)m^KY2o%8Y*yby|6x5h#repw&(A?6oSVYeU$@$~e8k)+8ppQsz2m}JZ99@=W zDlw%4U^izNP2qp8P_o}8iqn{R?qqv39wOMn(3^?m`hm>q{FP66=hN%KW8EQAyjRtjNd-n9Qwtu^~ \ No newline at end of file diff --git a/github-enterprise/index.js b/github-enterprise/index.js new file mode 100755 index 0000000..258da41 --- /dev/null +++ b/github-enterprise/index.js @@ -0,0 +1 @@ +module.exports = Franz => Franz; diff --git a/github-enterprise/package.json b/github-enterprise/package.json new file mode 100755 index 0000000..df9b393 --- /dev/null +++ b/github-enterprise/package.json @@ -0,0 +1,24 @@ +{ + "name": "Github Enterprise", + "version": "0.1.0", + "description": "Github Enterprise", + "main": "index.js", + "author": "Hiromasa Suzuki", + "license": "MIT", + "config": { + "serviceURL": "", + "serviceName": "Github Enterprise", + "popup": [], + "hasNotificationSound": true, + "hasedirectMessages": false, + "hasTeamID": true, + "customURL": true, + "hostedOnly": true, + "webviewOptions": {}, + "openDevTools": false, + "wording": { + "url": "github", + "team": "Github Enterprise" + } + } +} diff --git a/github-enterprise/webview.js b/github-enterprise/webview.js new file mode 100755 index 0000000..205cd1d --- /dev/null +++ b/github-enterprise/webview.js @@ -0,0 +1,15 @@ +module.exports = (Franz, options) => { + function getMessages() { + let count = 0; + let indirectCount = 0; + let badge = document.getElementById('numNotifs2'); + + if (badge && badge.innerText) { + indirectCount = parseInt(badge.innerText); + } + + Franz.setBadge(count, indirectCount); + } + + Franz.loop(getMessages); +}