Advertisement
hrkpg2017

Open image in new tab using mouse gestures

Nov 2nd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. How to open image in new tab using a mouse gesture
  2.  
  3. Note that other gestures extensions might work as well, but these ones have
  4. been tested and are known to work.
  5.  
  6.  
  7. Chrome
  8. ------
  9.  
  10. Install the Clean crxMouse Gestures extension (the regular one spies on you):
  11. https://chrome.google.com/webstore/detail/clean-crxmouse-gestures/mjidkpedjlfnanainpdfnedkdlacidla/
  12.  
  13. Go into preferences, open the Super Drag tab and enable the "If the link
  14. contains image,use Super Drag-image instead of drag-link" option. After that
  15. you can just drag images left to open in a background tab or right to open in a
  16. foreground tab.
  17.  
  18. Visual guide: https://i.imgur.com/8xDebU6.png
  19.  
  20.  
  21. Firefox Quantum
  22. ---------------
  23.  
  24. Install Foxy Gestures:
  25. https://addons.mozilla.org/en-US/firefox/addon/foxy-gestures/
  26.  
  27. Go into preferences, open the User Scripts tab, accept the malware warning, set
  28. whatever gesture you want and then copy and paste the "Open Image In New Tab"
  29. script from here:
  30. https://github.com/marklieberman/foxygestures/wiki/User-Scripts
  31.  
  32. For reference, here is the script:
  33.  
  34.  
  35. var src = data.element.mediaInfo && data.element.mediaInfo.source;
  36. if (src) {
  37. executeInBackground(src => {
  38. getActiveTab(tab => browser.tabs.create({
  39. url: src,
  40. index: tab.index + 1,
  41. active: true
  42. }));
  43. }, [ src ]);
  44. }
  45.  
  46.  
  47. Note that you can change the "active: true" line to "active: false" in order to
  48. open in a background tab.
  49.  
  50. Visual guide: https://i.imgur.com/Ox8jXGI.png
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement