Telegram fxtwitter
This commit is contained in:
17
Telegram FXTwitter Paste.ahk
Normal file
17
Telegram FXTwitter Paste.ahk
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#Requires AutoHotkey v2
|
||||||
|
#SingleInstance Force
|
||||||
|
#HotIf WinActive("ahk_exe Telegram.exe")
|
||||||
|
Persistent
|
||||||
|
|
||||||
|
^v:: { ; On Ctrl+V
|
||||||
|
fixedText := RegExReplace(
|
||||||
|
A_Clipboard,
|
||||||
|
'(?:https?:\/\/)?(?:mobile\.)?(?:x|twitter)\.com\/(\w+)\/status\/(\d+)',
|
||||||
|
'https://fxtwitter.com/$1/status/$2',
|
||||||
|
&ReplacementCount,
|
||||||
|
)
|
||||||
|
if (ReplacementCount > 0) {
|
||||||
|
A_Clipboard := fixedText
|
||||||
|
}
|
||||||
|
Send "^v"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user