Charcoal-SE / userscripts

Collection of userscripts that are used by/are useful to Charcoal.
https://charcoal-se.org/scripts
Apache License 2.0
28 stars 27 forks source link

SIM: Make "smokey" quicklink a proper link (in addition to its normal function as a button) #213

Closed codygray closed 1 year ago

codygray commented 1 year ago

This makes the "smokey" quicklink added by the script into a proper link (by changing it from a <button> element into an <a> element). The styling and normal behavior both remain unchanged. Instead of behaving like the built-in "close" and "flag" quicklinks (which are <button> elements and only have an associated pop-up), the "smokey" quicklink now behaves like the built-in "share" and "edit" quicklinks. When clicked normally, the pop-up is displayed. When clicked with a meta key depressed and/or invoked with a context menu, it now works like a normal link, going to the associated MS page for the post. Obviously, if the post has not been reported to MS, then the link will not do anything useful, so this is a much less generally useful way of interacting with the "smokey" quicklink, but it is still useful in cases where you already know that a post has been reported to MS and want to quickly get the associated MS link opened in a new tab without waiting for the pop-up to load and make an API request.

makyen commented 1 year ago

Thanks!