Skip to content

Commit f71db54

Browse files
authored
Better fix for missing sidebar
More idiomatic fix for Issue #37. It uses jQuery within the proper file, just before adding the sidebar base. It also directly tests the DOM to see if the "small-2" column is missing, rather than just guessing using the URL.
1 parent b0977fb commit f71db54

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

assets/js/modules/dom-modifier.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ export default class DomModifier {
120120

121121
$('#news, #newspost').replaceWith('<qc-news></qc-news>');
122122

123+
if (comicDirective.parent().siblings('.small-2').length === 0) {
124+
// There's no column after the comic: Insert our own
125+
comicDirective.parent().after('<div class="small-2 medium-expand column"></div>');
126+
}
123127
comicDirective.parent().siblings('.small-2').prepend('<qc-extra></qc-extra>');
124128

125129
// Set a base (required by Angular's html5Mode)

0 commit comments

Comments
 (0)