mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-22 09:15:48 +02:00
Work around scrolling causing notifications to popup
This commit is contained in:
parent
c5a15709e7
commit
08e071fd01
@ -85,6 +85,8 @@
|
||||
var container = mid.children(".js-chirp-container").first();
|
||||
if (container.length == 0)return;
|
||||
|
||||
var scroller = container.parent();
|
||||
|
||||
new MutationObserver(function(mutations){
|
||||
if (!container[0].hasAttribute("data-tweetdeck-loaded")){
|
||||
container[0].setAttribute("data-tweetdeck-loaded","");
|
||||
@ -94,6 +96,8 @@
|
||||
var data = TD.controller.columnManager.get(column.attr("data-column"));
|
||||
if (!data.model.getHasNotification())return;
|
||||
|
||||
if (scroller.scrollTop() != 0)return;
|
||||
|
||||
Array.prototype.forEach.call(mutations,function(mutation){
|
||||
Array.prototype.forEach.call(mutation.addedNodes,function(node){
|
||||
if (node.tagName != "ARTICLE")return;
|
||||
|
Loading…
Reference in New Issue
Block a user