Feature #4037


adhoc hide inline images

Added by Stefan R over 3 years ago. Updated over 3 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Operative System:


Would be great to have an option to hide displayed inline images.

Somthing like an "x" or right mouse button "hide" would be great. Maybe with a possibility to show them again.


Updated by Per Amundsen over 3 years ago

In AdiIRC all menus are scriptable in Menubar -> Tools -> Edit Menus, you could add one with a check for whether the clicked word is a link, and if so execute the /inlineimage command with the -r parameter to remove the image.

The -r parameter was added in 3.2 beta though.

Due to the complexity calculating line and text positions, it's not possible to have a "hidden" line in the text buffer.


Updated by Per Amundsen over 3 years ago

On second thought, there should be an $inlineimage(url) to check whether the url is currently in the cache, I'll add that.

Then the menu could be $iif($inlineimage($1), Remove,):/inlineimage -r $1


Updated by Per Amundsen over 3 years ago

On further thoughts, I think an option for a close/remove image button appearing when hovering the image makes sense, I'll add that for next beta.

Would also just like to mention the OnMenu API for manipulating the menus through plugins.


Updated by westor (GR) over 3 years ago

I made something related if you wanna give a try then ok, i would like also the option to have $inlineimage(url) to check whether the url is currently in the cache because inlineimage saves the files names using MD5, and that extra close/remove option would be good also.

(Place this code under Edit Scripts section)


menu link {
  $iif($regex($$1,$img_pattern),Parse Inline Image): {
    var %line_last = $fline($active,* $+ $1 $+ *,0)
    var %line = $fline($active,* $+ $1 $+ *,%line_last)
    inlineimage -ai $+ $calc(%line +1) $1
  $iif($regex($$1,$img_pattern),Hide Inline Image): { inlineimage -ra $1 }

alias -l img_pattern { return /.*\.(?:jpe?g|gif|png|tiff|ico)$/i }

- Thanks!

Also available in: Atom PDF