3

Screenshot / Code Snippet

userscript preview

About

Chat Overcharged is a userscript that aims to improve the quality of life of chat users. It is a living project, and more features are going to be added as the userscript matures.

The initial release (v1.5.1) focuses on making inserting links into messages easier:

  • If you had any text selected, the link title will be prefilled accordingly.
  • If no text was selected, the script will attempt to fetch and use the page title as one.
  • Choosing "add link" inserts a Markdown-formatted ([title](url)) link at cursor position.
  • If any text is selected before clicking "add link", it will be replaced by the formatted link.
  • The modal can be freely dragged around.

Change log

Version Updates
1.6.0 Stack Overflow & Stack Exchange comment link titles are fetched from the API and constructed as <comment body> by <author> on <short date>
1.6.1 StackApps, SuperUser, and AskUbuntu added to the list of sites with titles fetched from the API
1.6.2 Modal dragging is now supported in Firefox (see this old bug for details)
1.7.0 Ctrl (⌘ Command) + L shortcut minimizes the modal if it is already open
1.8.0 If selected text is a link, it will be inserted into the link input, and the title will be fetched if possible
1.8.1 Userscript no longer prevents normal drag and drop in chat
1.9.0 Keyboard shortcuts for text formatting

Keyboard shortcuts

Shortcut Action Notes
Ctrl (⌘ Command) + L toggles the modal in Chrome, supercedes the browser's one only if chat input is focused
Ctrl (⌘ Command) + B adds bold formatting to the current selection
Ctrl (⌘ Command) + I adds emphasis formatting to the current selection
Ctrl (⌘ Command) + Shift + S adds strikeout formatting to the current selection Shift ensures the shortcut doesn't interfere with the Ctrl + S browser shortcut
Esc minimizes the modal only active if the modal is already open

License

The script is licensed under the GPL-3.0-or-later license.

Download

Install | Minified

The script does not need a userscript manager to work (but shipped with the necessary headers anyway).

Platform

Version number means "last tested on":

Chrome Opera Firefox Edge IE
✔ 104.0.5112.81 ✔ 77.0.4054.203 ✔ 89.0 ✔ 92.0.902.55 no **

** If you need explicit support for IE or other unlisted browsers, buy me a coffee first. :)

Contact

Author: Oleg Valter
Organization: UserScripters

Please, submit bug reports on the source repository.
Before adding a new one, please check if it hasn't been raised before.

You can also drop by to chat, we are a friendly bunch.

Code

Source code written in TypeScript.

Contributions are welcome, you can always submit a PR here.

2
  • 2
    Are you sure coffee is strong enough to get you past every IE quirk?
    – rene
    Commented Jul 26, 2021 at 15:48
  • @rene depends on the version of IE :) 9-11th should be bearable with a dark roast brew
    – 0Valt
    Commented Jul 26, 2021 at 15:53

2 Answers 2

3

It seems to block dragging links into the text-area:

chat overcharted not letting me drag and drop

When I turn the script off, dragging and dropping works fine:

without chat overcharged
0
2

When I press Ctrl + L, it opens the modal, but when I repress Ctrl + L, it doesn't close it.

Simply, what I mean is that it could be toggled by clicking Ctrl + L.

I am not sure if this is by design but I think it is a feature request.

2
  • That's kinda by design - the initial implementation was exactly as you specified, but at some point I decided to opt for Esc to close the modal as a more semantic approach. I'd mark it "status-needs-more-input" :)
    – 0Valt
    Commented Jul 26, 2021 at 21:35
  • @OlegValter OK. I have marked it as [status-bydesign] since ESC is already close the modal, anyway, I would be happy if you change your mind to convert it to be toggle in the future. :)
    – Ghost
    Commented Jul 26, 2021 at 21:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .