Custom Menu Item, ini editing help

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. May 2010, 02:22:28

ssjoshi

Posts: 3

Custom Menu Item, ini editing help

Good day people~

I am looking to add an item to the menu when i right click a link. And that is to, search google for that link url with 'cache:' prepended to it.
Is this possible?

Cheers~

11. May 2010, 04:05:50

dude09

ex-Opera user

Posts: 5195

Item, "Search URL with Google"=Go to page, "http://www.google.com/search?safe=off&q=%l&sourceid=opera&num=%i&ie=utf-8&oe=utf-8"

11. May 2010, 04:50:26

ssjoshi

Posts: 3

Thanks so much, this is so close... how does one escape the '%3' in '%3A', the URL encoded colon... I believe Opera is picking it up as a blank variable...

Item, "Google Cache"=Go to page, "http://www.google.com/search?safe=off&q=cache%3A%l&sourceid=opera&num=%i&ie=utf-8&oe=utf-8"


is directing to~

http://www.google.com/search?client=opera&rls=en&safe=off&q=cacheAhttp://my.opera.com/community/forums/&sourceid=opera&num=&ie=utf-8&oe=utf-8

forum is parsing this as two seperate urls, it should be just the one

11. May 2010, 05:35:34

Vectronic

... ... ...

Posts: 2538

For a selected (text) URL:
Item, "Google Cache"="Go to page, "http://www.google.com/search?q=cache:%t""


However, for a link... I'm not sure it's possible... Dude09's suggestion (or the one you made) should work in Opera 9.x, 10.0, 10.1...but not in Opera 10.5x because they changed how link variables are used.

You would probably have to use JavaScript, or a complicated array of commands using the the action "Copy link, -2, "urlinfo"" somewhere in it... and I honestly can't think of a nice way of doing it without writing about half a page of JavaScript into the button... and even that would probably fail since JS and Copy don't like each other and that's the only way I can think of to communicate between JS and Opera actions.

14. May 2010, 16:55:27

Nailz

Posts: 754

Originally posted by Vectronic:

For a selected (text) URL:

Item, "Google Cache"="Go to page, "http://www.google.com/search?q=cache:%t""


However, for a link... I'm not sure it's possible... Dude09's suggestion (or the one you made) should work in Opera 9.x, 10.0, 10.1...but not in Opera 10.5x because they changed how link variables are used.

You would probably have to use JavaScript, or a complicated array of commands using the the action "Copy link, -2, "urlinfo"" somewhere in it... and I honestly can't think of a nice way of doing it without writing about half a page of JavaScript into the button... and even that would probably fail since JS and Copy don't like each other and that's the only way I can think of to communicate between JS and Opera actions.



I'm using http://lexi.ucoz.ru/allow-ini-variables.js

[Link Popup Menu] 
Item, "Google Cache" = Copy link, -2, "URLinfo" & Go to page, "javascript:void(document.location='http://www.google.com/search?sourceid=opera&q=cache:%c');"


Item, "Translate Link" = Copy link, -2, "URLinfo" & Go to page, "javascript:void(document.location='http://translate.google.com/translate?hl=en&langpair=auto|en&u=%c');"




Forums » General Opera topics » Customizing Opera