The My Opera forums have been replaced with forums.opera.com. Please head over there to discuss Opera's products and features

See the new Forums

Variable function for Opera?

Forums » General Opera topics » Customizing Opera

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

11. November 2011, 11:41:25

Guest703

Posts: 189

Variable function for Opera?

http://forums.tineye.com/discussion/76/using-tineye-with-opera-and-right-click-plugin-behaviour/p1

I used the method linked above to add Tineye to Opera's right click menu. Here is the specific code I'm using:

Item, "TinEye" = Activate window,,,,"search" & Copy image address & New page & Go to Page, "http://tineye.com/search?url=%c" & Minimize page


The issue I have is that it makes use of the clipboard, which is often a nuisance, as it over-writes other things I may have on the clipboard. Is there a way to store the text into a variable instead?

11. November 2011, 12:21:30

iWasHere

Posts: 202

Go to page, "javascript:var b=new Array();var c=1;var o=((document.onkeydown==null)||(o==2))?0:1;document.onkeydown=ck;z=document.getElementsByTagName('img');for(i=0;i<z.length;i++){if(z[i].tagName.search(/(HTML|BODY)/i)==-1){z[i].onclick=function(e){t=this;if(window.event)e=window.event;if((t==e.target)||(window.event))window.open('http://tineye.com/search?url='+t.src);if(window.opera)e.stopPropagation();return false;};z[i].onmouseover=function(){if(!c)return;c=0;t=this;b[t]=t.style.border;t.style.border='1px dotted red';};void(z[i].onmouseout=function(){t=this;t.style.border=b[t];c=1;});}}function ck(e){k=window.event?window.event.keyCode:e.keyCode;if((k==27)||o){o=2;document.onkeydown=null;for(i=0;i<z.length;i++){if(z[i].tagName.search(/(HTML|BODY)/i)==-1){z[i].onclick=null;z[i].onmouseover=null;z[i].onmouseout=null;z[i].style.backgroundColor=b[t];}}}}if(o==1)ck(1);"

setup this code with shortcut to use, click on image to search after activated.

11. November 2011, 13:04:14

Guest703

Posts: 189

Does not work, and I'd prefer not to use javascript for this. Is there no way to set a variable with Opera?

12. November 2011, 09:37:01

Moderator

sgunhouse

Volunteer

Posts: 66788

Buttons don't have variables, no.

Forums » General Opera topics » Customizing Opera