-
Notifications
You must be signed in to change notification settings - Fork 8
/
jose.coffee
130 lines (96 loc) · 20.7 KB
/
jose.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
commentForm = document.querySelector '.js-new-comment-form'
heartImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAMp0lEQVR4Xu1bCawV1Rn+zsy9b4OiQCkgyqJSCFBMEWyppNIa2mglpU0KptgggixKFURB27pF0FJEK7WaUqEWExtMjWkTYyvEVtQoLhgRZBMVEBCR9S33zr0z8/f7+2Z6ksnovPt8BVlu8uXMe/dmzv99/3bmzIwREZzMH4c4JcBJjFMC5FpD4DpjOlQDFxhgCIC+HDsBCANgD4D1IfDSfSIb2orAd4zJDQXOFwLAAAfoBgACHCA2E2sd4NWFIo2VcqmoCM4xppsAV7vAT40x/Q0ABeJzGAM9CkXqQ+B1AMt9YAXFKLSG+E3GtBNgvAtMcIChBqgyCQJi51ThlxeAZQ+K7G9zAUj+KheY5xjT3YggNsTYPEKQIBAYg0BkbQjMpXdWVUh+tAPcnTNmkBPZGJN3ozFMzBmqGCLbA+CW34j8pU1qAMO9eq4xj9CQpTmguyuCagA9zjgDQ0aPxsWzZ+MHCxfi0nvuwcgZM3DeJZegW7duqAIQ/XYIj5++2ZibDT8tCXf+8M488BTnGZQTQU0+j7MGDMCwiRMxat48jF62DGOWL8f3FizAN/m/nv36oYbk9bc5oBdtfZyTLdZzfa4IGGtM1dnAn/PGXK5kVK2z+vfHedOnoxeJ1lEEU6VUbTT4pR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x8XRckBARX6lWeAuS5tFaDXxlbyc5dK2/sUBFXrdqVN2S7crLRxi5xPD5KAt0dZ2mSwwuCYpl2O80TNTA50jsrGB43OQrDUf/bQmPXicQtiWt/StJPCBHaFkzqEREVGklk+GkPADsJJR3SycR8+h2G2tfJ0Z1ZBPKTk+wKtF/EQEvPfEAF9ovFVQIxNq3ZvHVt7JVoHBwK2yriFh4nfdDt9/+2Y8pi1pZznKbC6ZPhOGCTrRyM3EN+FXlwUshx73BgI+THR9dL7UKFTeEaIrlGpwnaPR/B0dAUED23JBldtB2EkgA0H/rgT+DY/gdxE8XgvUS0P49cS2zhUy1SGtArwMJ3ul0QVYUEQUPoOf1MEBQYPLeBAjFAvxeRNDXwShquLz9tzgIDI4+WP2oyoWl8SCNuA4pQffxxx+/9tZb7zhNuZ3H7WNXMYDrN8o6sYCIOC3ctEmgdEMTrqbd+as7Ca50223uQo8MDvUf3pcP5CrTsqioA6EgyXwgEudmK1yMAOEgCH3327x589rEvd8su/qqsTvo42fICybFAei2cqkq99xzn0rmuZUGjyGw4ChsyJyHksw+xbf8OTU40t+94nxB6AwMCADkUds1+wFHu1yEUeS0nt0fLqKAwWf2lXeFF7PJrUXA8MWmWngmy8P4IofR3xsmwvECJlLgz/1D03WqeVgVJwckpGm1qIUAFnkLlVNlyZQSUM4E0H47os8l/fv1pUX/bwH2iZgALi2uCJNmi1Gd5SMASoCgtwgAJt//Tg/BwrzmW2lr36zVcbwb0YEPtf/ghD0wi7swmlMHqioct1mSBbDsZoF5c5CmAgPXttwdVkvxOKmZTZA/J0a3QTWTFVVSLe6Hg1tebh9AqEJemC1OMJctSGZFZQsWE3PYLAkdIDHSWc1VoDAug5XTRinff2uM4CAa0mJhJbwmlRoCULVVUZsh5+n9V5I55zWvHxMo+3gVWP8PhqMNIcnlCMoAAAAASUVORK5CYII="
css = document.createElement('style')
css.innerHTML = "
.form-actions .tip {
display: none !important;
}
.jose-vs-oss {
clear: both;
}
.jose-vs-oss .btn {
float: inherit !important;
margin-left: -1px !important;
margin-right: 0 !important;
}
.jose-vs-oss .btn img {
vertical-align: sub;
}"
document.body.appendChild(css)
selectElements = =>
@actions = commentForm.querySelector '.form-actions'
@protip = commentForm.querySelector '.form-actions-protip'
@close = @actions.querySelector '.js-comment-and-button'
@comment = @actions.querySelector '.btn-primary'
@textarea = commentForm.querySelector 'textarea'
if commentForm
do selectElements
mutationObserver =
if WebKitMutationObserver?
WebKitMutationObserver
else
MutationObserver
observer = new mutationObserver (mutations) ->
mutations.forEach (mutation) ->
do selectElements
observer.observe @actions, childList: true
button = (text, innerHtml, closable = true) =>
btn = document.createElement 'button'
btn.innerHTML = text
btn.className = 'btn'
btn.setAttribute 'tabindex', '1'
btn.setAttribute 'type', 'submit'
btn.setAttribute 'title', innerHtml
btn.addEventListener 'click', (event) =>
do event.preventDefault
@textarea.value += " #{innerHtml}"
if closable && @close then do @close.click else do @comment.click
@textarea.value = ''
btn
insertButtons = =>
wrapper = document.createElement 'div'
wrapper.className = 'jose-vs-oss'
closeButtonGroupTitle = document.createElement 'span'
closeButtonGroupTitle.setAttribute 'style', 'float: left; margin: 5px 0px 0px 0px;'
closeButtonGroupTitle.textContent = 'Close this issue'
closeButtonGroup = document.createElement 'div'
closeButtonGroup.className = 'btn-group'
closeButtonGroup.setAttribute 'style', 'float: left; margin: -35px 0px 0px 0px;'
openButtonGroupTitle = document.createElement 'span'
openButtonGroupTitle.setAttribute 'style', 'float: left; margin: 5px 0px 0px 130px;'
openButtonGroupTitle.textContent = 'Keep it open'
openButtonGroup = document.createElement 'div'
openButtonGroup.className = 'btn-group'
if @close
openButtonGroup.setAttribute 'style', 'float: left; margin: -35px 0px 0px 130px;'
else
openButtonGroup.setAttribute 'style', 'float: left; margin: -35px 0px 0px 220px;'
# Sample application
btn = button 'Sample app', 'Can you please provide a sample application that reproduces the error?', false
openButtonGroup.appendChild btn
# Wiki
btn = button "Wiki", "The wiki is maintained by the community. So if there aren't any up to date instructions, we recommend you to explore the solution yourself and hopefully contribute your findings back!"
closeButtonGroup.appendChild btn
# Mailing list
btn = button "ML", "Please use the mailing list or StackOverflow for questions/help, where a wider community will be able to help you. We reserve the issues tracker for issues only."
closeButtonGroup.appendChild btn
# Bug report
btn = button "Bad bug report", "You need to give us more information on how to reproduce this issue, otherwise there is nothing we can do. Please read CONTRIBUTING.md file for more information about creating bug reports. Thanks!"
closeButtonGroup.appendChild btn
# Shipit Squirrel
btn = button "<img src='#{shipitImage}' width='14' height='14'>", ":shipit:", false
openButtonGroup.appendChild btn
# Hearts
btn = button "<img src='#{heartImage}' width='14' height='14'>", ":heart: :green_heart: :blue_heart: :yellow_heart: :purple_heart:", false
openButtonGroup.appendChild btn
wrapper.appendChild closeButtonGroup
wrapper.appendChild closeButtonGroupTitle if @close
wrapper.appendChild openButtonGroup
wrapper.appendChild openButtonGroupTitle if @close
clearfix = document.createElement 'div'
clearfix.setAttribute 'style', 'clear:both;'
wrapper.appendChild clearfix
@actions.appendChild wrapper
@protip?.remove()
do insertButtons if commentForm