diff --git a/Core/Notification/TweetNotification.cs b/Core/Notification/TweetNotification.cs index a431c695..a0b0c612 100644 --- a/Core/Notification/TweetNotification.cs +++ b/Core/Notification/TweetNotification.cs @@ -9,8 +9,6 @@ sealed class TweetNotification{ private const string DefaultFontSizeClass = "medium"; private const string DefaultHeadTag = @"<meta charset='utf-8'><meta http-equiv='X-UA-Compatible' content='chrome=1'><link rel='stylesheet' href='https://ton.twimg.com/tweetdeck-web/web/css/font.5ef884f9f9.css'><link rel='stylesheet' href='https://ton.twimg.com/tweetdeck-web/web/css/app-dark.5631e0dd42.css'>"; - - private const string FixedCSS = @"a[data-full-url]{word-break:break-all}.txt-base-smallest .badge-verified:before{height:13px!important}"; private const string CustomCSS = @".scroll-styled-v::-webkit-scrollbar{width:8px}.scroll-styled-v::-webkit-scrollbar-thumb{border-radius:0}#td-skip{opacity:0;cursor:pointer;transition:opacity 0.15s ease}.td-hover #td-skip{opacity:0.75}#td-skip:hover{opacity:1}"; public static int FontSizeLevel{ @@ -84,15 +82,12 @@ public string GenerateHtml(string bodyClasses = null, bool enableCustomCSS = tru build.Append("<head>").Append(HeadTag ?? DefaultHeadTag); if (enableCustomCSS){ - build.Append("<style type='text/css'>").Append(FixedCSS).Append(CustomCSS).Append("</style>"); + build.Append("<style type='text/css'>").Append(CustomCSS).Append("</style>"); if (!string.IsNullOrEmpty(Program.UserConfig.CustomNotificationCSS)){ build.Append("<style type='text/css'>").Append(Program.UserConfig.CustomNotificationCSS).Append("</style>"); } } - else{ - build.Append("<style type='text/css'>").Append(FixedCSS).Append("</style>"); - } build.Append("</head>"); build.Append("<body class='hearty"); diff --git a/Resources/Scripts/code.js b/Resources/Scripts/code.js index a3a7d0cf..ef4b9fa2 100644 --- a/Resources/Scripts/code.js +++ b/Resources/Scripts/code.js @@ -72,12 +72,17 @@ // Function: Retrieves the tags to be put into <head> for notification HTML code. // var getNotificationHeadContents = function(){ - var tags = []; + let tags = []; $(document.head).children("link[rel='stylesheet']:not([title]),link[title='"+TD.settings.getTheme()+"'],meta[charset],meta[http-equiv]").each(function(){ tags.push($(this)[0].outerHTML); }); + tags.push("<style type='text/css'>"); + tags.push("a[data-full-url]{ word-break: break-all }"); + tags.push(".txt-base-smallest .badge-verified:before { height: 13px !important }"); + tags.push("</style>"); + return tags.join(""); };