4chan-x
4chan-x copied to clipboard
New Option: Avoid Repeated Backlinks when Quoting Text
Why?
When I'm ~~arguing with strangers~~ discussing things on my favorite imageboards, I will sometimes want to use 4chan-X's text quoting feature to make a reply to several of a poster's ~~falsehoods~~ claims. I'll highlight the text to quote and hit the post number to open the QR, and I'll have a backlink and the quoted text.
All good, but if I were to select another passage and hit the quote button again, I get another pesky backlink for each quote:
It's annoying having to clear out the post numbers each time or manually copy/paste the bits of message. I guess I'm lazy.
What
If configured, I'd like 4chan-X to simplify this for me. The expectation is that after I quote a post once, re-selecting text from it and clicking quote again should copy only the text over to my QR box.
This is the expected output, with the new option enabled, and the same quoting procedure as above:
How
- Modifications to
QR.quote
:- Separates the generation of the quote backlink from the quote text.
- If no quote text was selected, behaves as normal.
- If quote text was selected, and the new option is enabled, it avoids adding the backlink if the backlink text can already be found in the comment body somewhere. Otherwise, behaves as normal.
- Add an option in the quoting section of the menu to control this behavior. Defaults to "off" (maintains previous behavior)
Testing
The extent of my testing is that I've loaded the resultant 4chan-X.user.js
v1.14.21.7-based userscript into my Violentmonkey v2.13.0 on Firefox 100.0 and tested that the following conditions are met:
- The option appears in its default state of disabled
- With the new option disabled, quoting behaves as it always has.
- With the new option enabled, quoting:
- Behaves as it always has under the following conditions:
- No highlighted text when quoting a post
- First time quoting a given post
- Avoids adding the backlinked post ID otherwise, adding only the selected text as a quote
- Behaves as it always has under the following conditions: