1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-09-14 19:32:10 +02:00

Compare commits

...

4 Commits

5 changed files with 15 additions and 12 deletions

View File

@@ -8,25 +8,25 @@ namespace TweetDuck.Core.Bridge{
public static string GenerateScript(Environment environment){ public static string GenerateScript(Environment environment){
string Bool(bool value){ string Bool(bool value){
return value ? "true," : "false,"; return value ? "true;" : "false;";
} }
StringBuilder build = new StringBuilder().Append("window.$TDX={"); StringBuilder build = new StringBuilder().Append("(function(x){");
build.Append("expandLinksOnHover:").Append(Bool(Program.UserConfig.ExpandLinksOnHover)); build.Append("x.expandLinksOnHover=").Append(Bool(Program.UserConfig.ExpandLinksOnHover));
if (environment == Environment.Browser){ if (environment == Environment.Browser){
build.Append("switchAccountSelectors:").Append(Bool(Program.UserConfig.SwitchAccountSelectors)); build.Append("x.switchAccountSelectors=").Append(Bool(Program.UserConfig.SwitchAccountSelectors));
build.Append("muteNotifications:").Append(Bool(Program.UserConfig.MuteNotifications)); build.Append("x.muteNotifications=").Append(Bool(Program.UserConfig.MuteNotifications));
build.Append("hasCustomNotificationSound:").Append(Bool(Program.UserConfig.NotificationSoundPath.Length > 0)); build.Append("x.hasCustomNotificationSound=").Append(Bool(Program.UserConfig.NotificationSoundPath.Length > 0));
build.Append("notificationMediaPreviews:").Append(Bool(Program.UserConfig.NotificationMediaPreviews)); build.Append("x.notificationMediaPreviews=").Append(Bool(Program.UserConfig.NotificationMediaPreviews));
} }
if (environment == Environment.Notification){ if (environment == Environment.Notification){
build.Append("skipOnLinkClick:").Append(Bool(Program.UserConfig.NotificationSkipOnLinkClick)); build.Append("x.skipOnLinkClick=").Append(Bool(Program.UserConfig.NotificationSkipOnLinkClick));
} }
return build.Append("}").ToString(); return build.Append("})(window.$TDX=window.$TDX||{})").ToString();
} }
} }
} }

View File

@@ -67,7 +67,7 @@ namespace TweetDuck.Core.Notification{
get{ get{
switch(Program.UserConfig.NotificationSize){ switch(Program.UserConfig.NotificationSize){
default: default:
return BrowserUtils.Scale(118, SizeScale*(1.0+0.075*TweetNotification.FontSizeLevel)); return BrowserUtils.Scale(122, SizeScale*(1.0+0.075*TweetNotification.FontSizeLevel));
case TweetNotification.Size.Custom: case TweetNotification.Size.Custom:
return Program.UserConfig.CustomNotificationSize.Height; return Program.UserConfig.CustomNotificationSize.Height;

View File

@@ -14,7 +14,7 @@ enabled(){
revertIcons: true, revertIcons: true,
smallComposeTextSize: false, smallComposeTextSize: false,
optimizeAnimations: true, optimizeAnimations: true,
avatarRadius: 10 avatarRadius: 2
}; };
this.firstTimeLoad = null; this.firstTimeLoad = null;

View File

@@ -122,7 +122,7 @@
</div> </div>
<div class="td-avatar-shape-item-outer" data-td-key="avatarRadius" data-td-value="10"> <div class="td-avatar-shape-item-outer" data-td-key="avatarRadius" data-td-value="10">
<div class="td-avatar-shape" style="border-radius:10%"></div> <div class="td-avatar-shape" style="border-radius:10%"></div>
<label>Default</label> <label>Legacy</label>
</div> </div>
<div class="td-avatar-shape-item-outer" data-td-key="avatarRadius" data-td-value="30"> <div class="td-avatar-shape-item-outer" data-td-key="avatarRadius" data-td-value="30">
<div class="td-avatar-shape" style="border-radius:30%"></div> <div class="td-avatar-shape" style="border-radius:30%"></div>

View File

@@ -165,6 +165,9 @@
} }
} }
} }
else if (tweet instanceof TD.services.TwitterActionOnTweet){
html.find(".js-media").remove();
}
html.find("a[href='#']").each(function(){ // remove <a> tags around links that don't lead anywhere (such as account names the tweet replied to) html.find("a[href='#']").each(function(){ // remove <a> tags around links that don't lead anywhere (such as account names the tweet replied to)
this.outerHTML = this.innerHTML; this.outerHTML = this.innerHTML;