|
184 | 184 |
|
185 | 185 | var editorHTML = (function editorHTML() { |
186 | 186 | return '<div id="gollum-editor-function-buttons" style="float: left;">' + |
187 | | - ' <div class="button-group">' + |
188 | | - ' <a href="#" id="function-bold" class="minibutton function-button tooltipped tooltipped-ne" aria-label="Bold" style="height:26px;">' + |
| 187 | + ' <div class="button-group btn-group">' + |
| 188 | + ' <a href="#" id="function-bold" class="btn btn-sm minibutton function-button tooltipped tooltipped-ne" aria-label="Bold" style="height:26px;">' + |
189 | 189 | ' <b style="font-weight: bolder;">B</b>' + |
190 | 190 | ' </a>' + |
191 | | - ' <a href="#" id="function-italic" class="minibutton function-button tooltipped tooltipped-ne" aria-label="Italic">' + |
| 191 | + ' <a href="#" id="function-italic" class="btn btn-sm minibutton function-button tooltipped tooltipped-ne" aria-label="Italic">' + |
192 | 192 | ' <em>i</em>' + |
193 | 193 | ' </a>' + |
194 | | - ' <a href="#" id="function-strikethrough" class="minibutton function-button tooltipped tooltipped-ne" aria-label="Strikethrough">' + |
| 194 | + ' <a href="#" id="function-strikethrough" class="btn btn-sm minibutton function-button tooltipped tooltipped-ne" aria-label="Strikethrough">' + |
195 | 195 | ' <s>S</s>' + |
196 | 196 | ' </a>' + |
197 | 197 | ' </div>' + |
198 | 198 |
|
199 | | - ' <div class="button-group">' + |
| 199 | + ' <div class="button-group btn-group">' + |
200 | 200 | ' <div class="select-menu js-menu-container js-select-menu">' + |
201 | | - ' <span class="minibutton select-menu-button icon-only js-menu-target" aria-label="Headers" style="padding:0 7px; width:auto; border-bottom-right-radius:3px; border-top-right-radius:3px;">' + |
| 201 | + ' <span class="btn btn-sm minibutton select-menu-button icon-only js-menu-target" aria-label="Headers" style="padding-left:7px; padding-right:7px; width:auto; border-bottom-right-radius:3px; border-top-right-radius:3px;">' + |
202 | 202 | ' <span class="js-select-button">h#</span>' + |
203 | 203 | ' </span>' + |
204 | 204 | ' <div class="select-menu-modal-holder js-menu-content js-navigation-container js-active-navigation-container" style="top: 26px;">' + |
|
207 | 207 | ' <span class="select-menu-title">Choose header</span>' + |
208 | 208 | ' <span class="octicon octicon-remove-close js-menu-close"></span>' + |
209 | 209 | ' </div>' + |
210 | | - ' <div class="button-group">' + |
211 | | - ' <a href="#" id="function-h1" class="minibutton function-button js-navigation-item js-menu-close tooltipped tooltipped-s" aria-label="Header 1">' + |
| 210 | + ' <div class="button-group btn-group">' + |
| 211 | + ' <a href="#" id="function-h1" class="btn btn-sm minibutton function-button js-navigation-item js-menu-close tooltipped tooltipped-s" aria-label="Header 1">' + |
212 | 212 | ' <b class="select-menu-item-text js-select-button-text">h1</b>' + |
213 | 213 | ' </a>' + |
214 | | - ' <a href="#" id="function-h2" class="minibutton function-button js-navigation-item js-menu-close tooltipped tooltipped-s" aria-label="Header 2">' + |
| 214 | + ' <a href="#" id="function-h2" class="btn btn-sm minibutton function-button js-navigation-item js-menu-close tooltipped tooltipped-s" aria-label="Header 2">' + |
215 | 215 | ' <b class="select-menu-item-text js-select-button-text">h2</b>' + |
216 | 216 | ' </a>' + |
217 | | - ' <a href="#" id="function-h3" class="minibutton function-button js-navigation-item js-menu-close tooltipped tooltipped-s" aria-label="Header 3">' + |
| 217 | + ' <a href="#" id="function-h3" class="btn btn-sm minibutton function-button js-navigation-item js-menu-close tooltipped tooltipped-s" aria-label="Header 3">' + |
218 | 218 | ' <b class="select-menu-item-text js-select-button-text">h3</b>' + |
219 | 219 | ' </a>' + |
220 | | - ' <a href="#" id="function-h4" class="minibutton function-button js-navigation-item js-menu-close tooltipped tooltipped-s" aria-label="Header 4">' + |
| 220 | + ' <a href="#" id="function-h4" class="btn btn-sm minibutton function-button js-navigation-item js-menu-close tooltipped tooltipped-s" aria-label="Header 4">' + |
221 | 221 | ' <b class="select-menu-item-text js-select-button-text">h4</b>' + |
222 | 222 | ' </a>' + |
223 | | - ' <a href="#" id="function-h5" class="minibutton function-button js-navigation-item js-menu-close tooltipped tooltipped-s" aria-label="Header 5">' + |
| 223 | + ' <a href="#" id="function-h5" class="btn btn-sm minibutton function-button js-navigation-item js-menu-close tooltipped tooltipped-s" aria-label="Header 5">' + |
224 | 224 | ' <b class="select-menu-item-text js-select-button-text">h5</b>' + |
225 | 225 | ' </a>' + |
226 | | - ' <a href="#" id="function-h6" class="minibutton function-button js-navigation-item js-menu-close tooltipped tooltipped-s" aria-label="Header 6">' + |
| 226 | + ' <a href="#" id="function-h6" class="btn btn-sm minibutton function-button js-navigation-item js-menu-close tooltipped tooltipped-s" aria-label="Header 6">' + |
227 | 227 | ' <b class="select-menu-item-text js-select-button-text">h6</b>' + |
228 | 228 | ' </a>' + |
229 | 229 | ' </div>' + |
|
232 | 232 | ' </div>' + |
233 | 233 | ' </div>' + |
234 | 234 |
|
235 | | - ' <div class="button-group">' + |
236 | | - ' <a href="#" id="function-link" class="minibutton function-button tooltipped tooltipped-ne" aria-label="Link">' + |
| 235 | + ' <div class="button-group btn-group">' + |
| 236 | + ' <a href="#" id="function-link" class="btn btn-sm minibutton function-button tooltipped tooltipped-ne" aria-label="Link">' + |
237 | 237 | ' <span class="octicon octicon-link"></span>' + |
238 | 238 | ' </a>' + |
239 | | - ' <a href="#" id="function-image" class="minibutton function-button tooltipped tooltipped-ne" aria-label="Image">' + |
| 239 | + ' <a href="#" id="function-image" class="btn btn-sm minibutton function-button tooltipped tooltipped-ne" aria-label="Image">' + |
240 | 240 | ' <span class="octicon octicon-file-media"></span>' + |
241 | 241 | ' </a>' + |
242 | 242 | ' </div>' + |
243 | | - ' <div class="button-group">' + |
244 | | - ' <a href="#" id="function-ul" class="minibutton function-button tooltipped tooltipped-ne" aria-label="Unordered List">' + |
| 243 | + ' <div class="button-group btn-group">' + |
| 244 | + ' <a href="#" id="function-ul" class="btn btn-sm minibutton function-button tooltipped tooltipped-ne" aria-label="Unordered List">' + |
245 | 245 | ' <span class="octicon octicon-list-unordered"></span>' + |
246 | 246 | ' </a>' + |
247 | | - ' <a href="#" id="function-ol" class="minibutton function-button tooltipped tooltipped-ne" aria-label="Ordered List">' + |
| 247 | + ' <a href="#" id="function-ol" class="btn btn-sm minibutton function-button tooltipped tooltipped-ne" aria-label="Ordered List">' + |
248 | 248 | ' <span class="octicon octicon-list-ordered"></span>' + |
249 | 249 | ' </a>' + |
250 | | - ' <a href="#" id="function-checklist" class="minibutton function-button tooltipped tooltipped-ne" aria-label="Task List">' + |
| 250 | + ' <a href="#" id="function-checklist" class="btn btn-sm minibutton function-button tooltipped tooltipped-ne" aria-label="Task List">' + |
251 | 251 | ' <span class="octicon octicon-checklist"></span>' + |
252 | 252 | ' </a>' + |
253 | 253 | ' </div>' + |
254 | 254 |
|
255 | | - ' <div class="button-group">' + |
256 | | - ' <a href="#" id="function-code" class="minibutton function-button tooltipped tooltipped-ne" aria-label="Code">' + |
| 255 | + ' <div class="button-group btn-group">' + |
| 256 | + ' <a href="#" id="function-code" class="btn btn-sm minibutton function-button tooltipped tooltipped-ne" aria-label="Code">' + |
257 | 257 | ' <span class="octicon octicon-code"></span>' + |
258 | 258 | ' </a>' + |
259 | | - ' <a href="#" id="function-blockquote" class="minibutton function-button tooltipped tooltipped-ne" aria-label="Blockquote">' + |
| 259 | + ' <a href="#" id="function-blockquote" class="btn btn-sm minibutton function-button tooltipped tooltipped-ne" aria-label="Blockquote">' + |
260 | 260 | ' <span class="octicon octicon-quote"></span>' + |
261 | 261 | ' </a>' + |
262 | | - ' <a href="#" id="function-hr" class="minibutton function-button tooltipped tooltipped-ne" aria-label="Horizontal Rule">' + |
| 262 | + ' <a href="#" id="function-hr" class="btn btn-sm minibutton function-button tooltipped tooltipped-ne" aria-label="Horizontal Rule">' + |
263 | 263 | ' <span class="octicon octicon-horizontal-rule"></span>' + |
264 | 264 | ' </a>' + |
265 | | - ' <a href="#" id="function-table" class="minibutton function-button tooltipped tooltipped-ne" aria-label="Table">' + |
| 265 | + ' <a href="#" id="function-table" class="btn btn-sm minibutton function-button tooltipped tooltipped-ne" aria-label="Table">' + |
266 | 266 | ' <span class="octicon octicon-three-bars"></span>' + |
267 | 267 | ' </a>' + |
268 | 268 | ' </div>' + |
269 | 269 |
|
270 | | - ' <div class="button-group">' + |
| 270 | + ' <div class="button-group btn-group">' + |
271 | 271 | ' <div class="select-menu js-menu-container js-select-menu">' + |
272 | | - ' <span class="minibutton select-menu-button js-menu-target" aria-label="Snippets" style="padding:0 7px; width:auto; border-bottom-right-radius:3px; border-top-right-radius:3px;">' + |
| 272 | + ' <span class="btn btn-sm minibutton select-menu-button js-menu-target" aria-label="Snippets" style="padding-left:7px; padding-right:7px; width:auto; border-bottom-right-radius:3px; border-top-right-radius:3px;">' + |
273 | 273 | ' <span class="octicon octicon-pin"></span>' + |
274 | 274 | ' </span>' + |
275 | 275 | ' <div class="select-menu-modal-holder js-menu-content js-navigation-container js-active-navigation-container">' + |
|
307 | 307 |
|
308 | 308 | '</div>' + |
309 | 309 |
|
310 | | - '<div class="button-group" style="float:right;">' + |
311 | | - ' <a href="#" id="function-clear" class="minibutton function-button tooltipped tooltipped-nw" aria-label="Clear">' + |
| 310 | + '<div style="float:right;">' + |
| 311 | + ' <a href="#" id="function-clear" class="btn btn-sm minibutton function-button tooltipped tooltipped-nw" aria-label="Clear">' + |
312 | 312 | ' <span class="octicon octicon-circle-slash"></span>' + |
313 | 313 | ' </a>' + |
314 | 314 | '</div>'; |
|
471 | 471 | commentForm.parentNode.insertBefore(gollumEditor, commentForm); |
472 | 472 | } |
473 | 473 |
|
474 | | - var tabnavExtras = commentForm.parentNode.parentNode.querySelector(".comment-form-head .tabnav-right"); |
| 474 | + var tabnavExtras = commentForm.parentNode.parentNode.querySelector(".comment-form-head .tabnav-right, .comment-form-head .right"); |
475 | 475 | if (tabnavExtras) { |
476 | 476 | var sponsored = document.createElement("a"); |
477 | | - sponsored.setAttribute("href", "https://github.com/jerone/UserScripts/tree/master/Github_Comment_Enhancer"); |
478 | 477 | sponsored.setAttribute("target", "_blank"); |
479 | | - sponsored.classList.add("tabnav-widget", "text", "tabnav-extras"); |
| 478 | + sponsored.setAttribute("href", "https://github.com/jerone/UserScripts/tree/master/Github_Comment_Enhancer"); |
| 479 | + sponsored.classList.add("tabnav-widget", "text", "tabnav-extras", "tabnav-extra"); |
480 | 480 | var sponsoredIcon = document.createElement("span"); |
481 | 481 | sponsoredIcon.classList.add("octicon", "octicon-question"); |
482 | 482 | sponsored.appendChild(sponsoredIcon); |
|
0 commit comments