Skip to content

Commit 9f869bd

Browse files
committed
🐛 Fixed issues after recent layout updates (fixes jerone#43);
1 parent b6e3cbe commit 9f869bd

2 files changed

Lines changed: 33 additions & 32 deletions

File tree

Github_Comment_Enhancer/Github_Comment_Enhancer.user.js

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -184,21 +184,21 @@
184184

185185
var editorHTML = (function editorHTML() {
186186
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;">' +
189189
' <b style="font-weight: bolder;">B</b>' +
190190
' </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">' +
192192
' <em>i</em>' +
193193
' </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">' +
195195
' <s>S</s>' +
196196
' </a>' +
197197
' </div>' +
198198

199-
' <div class="button-group">' +
199+
' <div class="button-group btn-group">' +
200200
' <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;">' +
202202
' <span class="js-select-button">h#</span>' +
203203
' </span>' +
204204
' <div class="select-menu-modal-holder js-menu-content js-navigation-container js-active-navigation-container" style="top: 26px;">' +
@@ -207,23 +207,23 @@
207207
' <span class="select-menu-title">Choose header</span>' +
208208
' <span class="octicon octicon-remove-close js-menu-close"></span>' +
209209
' </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">' +
212212
' <b class="select-menu-item-text js-select-button-text">h1</b>' +
213213
' </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">' +
215215
' <b class="select-menu-item-text js-select-button-text">h2</b>' +
216216
' </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">' +
218218
' <b class="select-menu-item-text js-select-button-text">h3</b>' +
219219
' </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">' +
221221
' <b class="select-menu-item-text js-select-button-text">h4</b>' +
222222
' </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">' +
224224
' <b class="select-menu-item-text js-select-button-text">h5</b>' +
225225
' </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">' +
227227
' <b class="select-menu-item-text js-select-button-text">h6</b>' +
228228
' </a>' +
229229
' </div>' +
@@ -232,44 +232,44 @@
232232
' </div>' +
233233
' </div>' +
234234

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">' +
237237
' <span class="octicon octicon-link"></span>' +
238238
' </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">' +
240240
' <span class="octicon octicon-file-media"></span>' +
241241
' </a>' +
242242
' </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">' +
245245
' <span class="octicon octicon-list-unordered"></span>' +
246246
' </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">' +
248248
' <span class="octicon octicon-list-ordered"></span>' +
249249
' </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">' +
251251
' <span class="octicon octicon-checklist"></span>' +
252252
' </a>' +
253253
' </div>' +
254254

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">' +
257257
' <span class="octicon octicon-code"></span>' +
258258
' </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">' +
260260
' <span class="octicon octicon-quote"></span>' +
261261
' </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">' +
263263
' <span class="octicon octicon-horizontal-rule"></span>' +
264264
' </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">' +
266266
' <span class="octicon octicon-three-bars"></span>' +
267267
' </a>' +
268268
' </div>' +
269269

270-
' <div class="button-group">' +
270+
' <div class="button-group btn-group">' +
271271
' <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;">' +
273273
' <span class="octicon octicon-pin"></span>' +
274274
' </span>' +
275275
' <div class="select-menu-modal-holder js-menu-content js-navigation-container js-active-navigation-container">' +
@@ -307,8 +307,8 @@
307307

308308
'</div>' +
309309

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">' +
312312
' <span class="octicon octicon-circle-slash"></span>' +
313313
' </a>' +
314314
'</div>';
@@ -471,12 +471,12 @@
471471
commentForm.parentNode.insertBefore(gollumEditor, commentForm);
472472
}
473473

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");
475475
if (tabnavExtras) {
476476
var sponsored = document.createElement("a");
477-
sponsored.setAttribute("href", "https://github.com/jerone/UserScripts/tree/master/Github_Comment_Enhancer");
478477
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");
480480
var sponsoredIcon = document.createElement("span");
481481
sponsoredIcon.classList.add("octicon", "octicon-question");
482482
sponsored.appendChild(sponsoredIcon);

Github_Comment_Enhancer/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Add features to enhance comments & wiki on [Github](https://github.com) and comm
2929
## Version History
3030

3131
* **vNext**
32+
* Fixed issues after recent layout updates (fixes https://github.com/jerone/UserScripts/issues/43);
3233
* Added support for GFM task lists in replies (fixes https://github.com/jerone/UserScripts/issues/35);
3334
* **2.1.0**
3435
* Added tab character as a snippet (thnx to [r-a-y](https://github.com/r-a-y), fixes https://github.com/jerone/UserScripts/issues/41);

0 commit comments

Comments
 (0)