Skip to content

Commit

Permalink
added to yt-subbox-fix a comment with the DOM path
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Dvorak committed Jan 24, 2016
1 parent 049845a commit 7773571
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion yt-subbox-fix.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,22 @@ function awaitElement(parent, selector, callback){
});
mo.observe(parent, {childList:true, subtree:true})
}
}
}

// With a guide count, the DOM is:
// body#body > div#body-container > div#page-container > div#page > div#guide > div#appbar-guide-menu
// > div#guide-container > div.guide-module-content > ul.guide-toplevel > li.guide-section
// > div.guide-item-container > ul.guide-user-links > li#subscriptions-guide-item.guide-notification-item
// > a.guide-item > (span.yt-valign-container > span.display-name) ~ (span.guide-count > span.guide-count-value)
// Without a guide count, the DOM is:
// body#body > div#body-container > div#page-container > div#page > div#guide > div#appbar-guide-menu
// > div#guide-container > div.guide-module-content > ul.guide-toplevel > li.guide-section
// > div.guide-item-container > ul.guide-user-links > li#subscriptions-guide-item.guide-notification-item
// > a.guide-item > span.yt-valign-container > span.display-name.no-count
// The diff seems to be:
// in the context of #subscriptions-guide-item
// remove .no-count from .display-name
// append span.guide-count.yt-uix-tooltip.yt-valign to .guide-item
// append span.yt-valign-container.guide-count-value to the new element
// set its value to the desired number
// The same DOM exists on video pages (pop-up menu) as on feed pages (persistent menu)

0 comments on commit 7773571

Please sign in to comment.