[TWC] modify ImageSizePlugin to open images in new tab

58 views
Skip to first unread message

julien23

unread,
Feb 6, 2017, 11:25:59 AM2/6/17
to TiddlyWiki
Hi all

I would like to change ImageSizePlugin shift click beaviour to open image in a new tab.

Here is the Source: http://www.TiddlyTools.com/#ImageSizePlugin
Here is the Line to be modified :
if (ev.shiftKey) { this.style.width=this.style.height=''; }

Thank you in advance

JBo

Tobias Beer

unread,
Feb 6, 2017, 5:33:56 PM2/6/17
to TiddlyWiki
Hi JBo,

Try...

if (ev.shiftKey) { window.open(this.getAttribute('src'),'Image','width=' + this.clientWidth + ',height=' + this.clientHeight + ',resizable=1'); }

...and be sure to give the plugin a new version, and something like "MOD JBO", so people know it's not the original, should they stumble upon it.

Best wishes,

Tobias.

Reply all
Reply to author
Forward
0 new messages