mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-23 21:15:49 +02:00
Minor refactoring (fix FormBrowser formatting, tweak JS init code)
This commit is contained in:
parent
9d8cda9b6d
commit
f74a7c8ed3
@ -38,15 +38,14 @@
|
||||
var app = $("body").children(".js-app");
|
||||
|
||||
new MutationObserver(function(mutations){
|
||||
if (mutations.some(mutation => mutation.attributeName === "class")){
|
||||
if (isInitialized && app.hasClass("is-hidden")){
|
||||
isInitialized = false;
|
||||
}
|
||||
else if (!isInitialized && !app.hasClass("is-hidden")){
|
||||
initializeTweetDick();
|
||||
}
|
||||
if (isInitialized && app.hasClass("is-hidden")){
|
||||
isInitialized = false;
|
||||
}
|
||||
else if (!isInitialized && !app.hasClass("is-hidden")){
|
||||
initializeTweetDick();
|
||||
}
|
||||
}).observe(app[0],{
|
||||
attributes: true
|
||||
attributes: true,
|
||||
attributeFilter: [ "class" ]
|
||||
});
|
||||
})($,$TD);
|
||||
|
Loading…
Reference in New Issue
Block a user