diff --git a/Core/Notification/FormNotificationBase.cs b/Core/Notification/FormNotificationBase.cs index f5c5e2fe..3eb3cfc8 100644 --- a/Core/Notification/FormNotificationBase.cs +++ b/Core/Notification/FormNotificationBase.cs @@ -206,7 +206,7 @@ public void DisplayTooltip(string text){ else{ Point position = PointToClient(Cursor.Position); position.Offset(20, 5); - toolTip.Show(text, this, position); // TODO figure out flickering when moving the mouse + toolTip.Show(text, this, position); } } } diff --git a/Resources/Plugins/edit-design/browser.js b/Resources/Plugins/edit-design/browser.js index 1302013a..238d70b6 100644 --- a/Resources/Plugins/edit-design/browser.js +++ b/Resources/Plugins/edit-design/browser.js @@ -36,7 +36,7 @@ enabled(){ var loadConfigObject = obj => { this.tmpConfig = obj || {}; - if (window.TD_APP_READY){ + if (TD.ready){ this.onAppReady(); } diff --git a/Resources/Scripts/code.js b/Resources/Scripts/code.js index 367efbd5..13098351 100644 --- a/Resources/Scripts/code.js +++ b/Resources/Scripts/code.js @@ -95,7 +95,7 @@ tags.push("<style type='text/css'>"); tags.push("body { background-color: "+getClassStyleProperty("column", "background-color")+" }"); - tags.push("a[data-full-url]{ word-break: break-all }"); + tags.push("a[data-full-url] { word-break: break-all }"); tags.push(".txt-base-smallest .badge-verified:before { height: 13px !important }"); tags.push("</style>"); @@ -626,9 +626,11 @@ TD.services.TwitterMedia.SERVICES["youtube"] = TD.services.TwitterMedia.YOUTUBE_RE; // - // Block: Finish initialization and load plugins. + // Block: Register the TD.ready event, finish initialization, and load plugins. // - onAppReady.push(function(){ + $(document).one("TD.ready", function(){ + onAppReady.forEach(func => func()); + $TD.loadFontSizeClass(TD.settings.getFontSize()); $TD.loadNotificationHeadContents(getNotificationHeadContents()); @@ -636,20 +638,4 @@ window.TD_PLUGINS.onReady(); } }); - - // - // Block: Observe the main app element and call the ready event whenever the contents are loaded. - // - new MutationObserver(function(){ - if (window.TD_APP_READY && app.hasClass("is-hidden")){ - window.TD_APP_READY = false; - } - else if (!window.TD_APP_READY && !app.hasClass("is-hidden")){ - onAppReady.forEach(func => func()); - window.TD_APP_READY = true; - } - }).observe(app[0], { - attributes: true, - attributeFilter: [ "class" ] - }); })($, $TD, $TDX, TD); diff --git a/Resources/Scripts/plugins.browser.js b/Resources/Scripts/plugins.browser.js index f875b601..36c27ee7 100644 --- a/Resources/Scripts/plugins.browser.js +++ b/Resources/Scripts/plugins.browser.js @@ -40,7 +40,7 @@ } runWhenReady(plugin){ - if (window.TD_APP_READY){ + if (TD.ready){ plugin.obj.ready(); } else{