mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-08-17 00:31:42 +02:00
.github
.idea
bld
lib
TweetLib.Browser
TweetLib.Browser.CEF
TweetLib.Communication
TweetLib.Core
Application
Features
Notifications
Plugins
TweetDeck
ISoundNotificationHandler.cs
ITweetDeckInterface.cs
TweetDeckBridgeObject.cs
TweetDeckBrowser.cs
TweetDeckExtraContext.cs
TweetDeckFunctions.cs
TweetDuckSchemeHandler.cs
VendorScriptProcessor.cs
Twitter
BaseBrowser.cs
BaseContextMenu.cs
BaseResourceRequestHandler.cs
CommonBridgeObject.cs
FileDownloadManager.cs
ICommonInterface.cs
PropertyObjectScript.cs
Resources
Systems
App.cs
Lib.cs
TweetLib.Core.csproj
TweetLib.Utils
TweetTest.Browser.CEF
TweetTest.Core
TweetTest.Utils
linux
resources
windows
.gitattributes
.gitignore
LICENSE.md
README.md
TweetDuck.sln
TweetDuck.sln.DotSettings
Version.cs
global.json
55 lines
1.7 KiB
C#
55 lines
1.7 KiB
C#
using System;
|
|
using System.Text;
|
|
using System.Text.RegularExpressions;
|
|
using TweetLib.Browser.Interfaces;
|
|
|
|
namespace TweetLib.Core.Features.TweetDeck {
|
|
public sealed class TweetDeckFunctions {
|
|
private readonly IScriptExecutor executor;
|
|
|
|
internal TweetDeckFunctions(IScriptExecutor executor) {
|
|
this.executor = executor;
|
|
}
|
|
|
|
public void ReinjectCustomCSS(string? css) {
|
|
executor.RunFunction("TDGF_reinjectCustomCSS", css == null ? string.Empty : Regex.Replace(css, "\r?\n", " "));
|
|
}
|
|
|
|
public void OnMouseClickExtra(int button) {
|
|
executor.RunFunction("TDGF_onMouseClickExtra", button);
|
|
}
|
|
|
|
public void ShowTweetDetail(string columnId, string chirpId, string fallbackUrl) {
|
|
executor.RunFunction("TDGF_showTweetDetail", columnId, chirpId, fallbackUrl);
|
|
}
|
|
|
|
public void AddSearchColumn(string query) {
|
|
executor.RunFunction("TDGF_performSearch", query);
|
|
}
|
|
|
|
public void TriggerTweetScreenshot(string columnId, string chirpId) {
|
|
executor.RunFunction("TDGF_triggerScreenshot", columnId, chirpId);
|
|
}
|
|
|
|
public void ReloadColumns() {
|
|
executor.RunFunction("TDGF_reloadColumns");
|
|
}
|
|
|
|
public void PlaySoundNotification(bool force) {
|
|
executor.RunFunction("TDGF_playSoundNotification", force);
|
|
}
|
|
|
|
public void ApplyROT13() {
|
|
executor.RunFunction("TDGF_applyROT13");
|
|
}
|
|
|
|
public void SetSoundNotificationData(bool isCustom, int volume) {
|
|
executor.RunFunction("TDGF_setSoundNotificationData", isCustom, volume);
|
|
}
|
|
|
|
public void ShowUpdateNotification(string versionTag, string releaseNotes) {
|
|
executor.RunFunction("TDUF_displayNotification", versionTag, Convert.ToBase64String(Encoding.GetEncoding("iso-8859-1").GetBytes(releaseNotes)));
|
|
}
|
|
}
|
|
}
|