{"id":532,"date":"2009-02-04T12:56:46","date_gmt":"2009-02-04T11:56:46","guid":{"rendered":"http:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/"},"modified":"2009-02-04T12:56:46","modified_gmt":"2009-02-04T11:56:46","slug":"ubiquity-for-opera","status":"publish","type":"post","link":"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/","title":{"rendered":"Ubiquity for Opera"},"content":{"rendered":"<p>\n<span class='imgright'><img alt='' src='http:\/\/files.myopera.com\/cstrep\/blog\/ubiq.jpg' \/><\/span><br \/>\nI think Ubiquity is a pretty cool project, probably a bit overrated, but &#8230;<br \/>\nI thought it would be nice to try to build something like that for Opera, and learning UserJS along the way.<\/p>\n<p>\nI managed to get the basics working. Right now, there&#39;s only one command, <code>tran-no<\/code> which takes you to the Google Translate page from Norwegian to English. If you have selected some text before bringing up &quot;Ubiquity&quot; (<code>CTRL + SPACE<\/code>), then typing <code>tran-no<\/code> + <code>ENTER<\/code> will translate that text for you.\n<\/p>\n<p>\nNow I was trying to make it <b>replace<\/b> the text inline inside the page, instead of popping up a new tab with the Google Translate window. It seems that is somewhat harder, especially because the text you select might be broken up in several pieces, like:\n<\/p>\n<p>\n<code><br \/>\nThis might be &lt;b&gt;your text&lt;\/b&gt;, so how do you &#xA0; replace it?<br \/>\n<\/code>\n<\/p>\n<p>\nHere it is: <a class=\"attach\" href=\"http:\/\/files.myopera.com\/cstrep\/blog\/ubiquity.js\" rel=\"nofollow\" target=\"_blank\">ubiquity.js<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I think Ubiquity is a pretty cool project, probably a bit overrated, but &#8230; I thought it would be nice to try to build something like that for Opera, and learning UserJS along the way. I managed to get the basics working. Right now, there&#39;s only one command, tran-no which takes you to the Google [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[118,117,74,72,73],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Ubiquity for Opera - Random hacking<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ubiquity for Opera - Random hacking\" \/>\n<meta property=\"og:description\" content=\"I think Ubiquity is a pretty cool project, probably a bit overrated, but &#8230; I thought it would be nice to try to build something like that for Opera, and learning UserJS along the way. I managed to get the basics working. Right now, there&#039;s only one command, tran-no which takes you to the Google [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/\" \/>\n<meta property=\"og:site_name\" content=\"Random hacking\" \/>\n<meta property=\"article:published_time\" content=\"2009-02-04T11:56:46+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/files.myopera.com\/cstrep\/blog\/ubiq.jpg\" \/>\n<meta name=\"author\" content=\"cosimo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"cosimo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/\"},\"author\":{\"name\":\"cosimo\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\"},\"headline\":\"Ubiquity for Opera\",\"datePublished\":\"2009-02-04T11:56:46+00:00\",\"dateModified\":\"2009-02-04T11:56:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/\"},\"wordCount\":134,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\"},\"image\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/files.myopera.com\/cstrep\/blog\/ubiq.jpg\",\"keywords\":[\"extensions\",\"firefox\",\"opera\",\"ubiquity\",\"userjs\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/\",\"url\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/\",\"name\":\"Ubiquity for Opera - Random hacking\",\"isPartOf\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/files.myopera.com\/cstrep\/blog\/ubiq.jpg\",\"datePublished\":\"2009-02-04T11:56:46+00:00\",\"dateModified\":\"2009-02-04T11:56:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/#primaryimage\",\"url\":\"http:\/\/files.myopera.com\/cstrep\/blog\/ubiq.jpg\",\"contentUrl\":\"http:\/\/files.myopera.com\/cstrep\/blog\/ubiq.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.streppone.it\/cosimo\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ubiquity for Opera\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#website\",\"url\":\"https:\/\/www.streppone.it\/cosimo\/blog\/\",\"name\":\"Random hacking\",\"description\":\"Assume nothing. Code defensively. Keep it simple, stupid!\",\"publisher\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.streppone.it\/cosimo\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\",\"name\":\"cosimo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g\",\"caption\":\"cosimo\"},\"logo\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/www.streppone.it\/cosimo\/blog\/author\/cosimo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Ubiquity for Opera - Random hacking","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/","og_locale":"en_US","og_type":"article","og_title":"Ubiquity for Opera - Random hacking","og_description":"I think Ubiquity is a pretty cool project, probably a bit overrated, but &#8230; I thought it would be nice to try to build something like that for Opera, and learning UserJS along the way. I managed to get the basics working. Right now, there&#39;s only one command, tran-no which takes you to the Google [&hellip;]","og_url":"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/","og_site_name":"Random hacking","article_published_time":"2009-02-04T11:56:46+00:00","og_image":[{"url":"http:\/\/files.myopera.com\/cstrep\/blog\/ubiq.jpg"}],"author":"cosimo","twitter_card":"summary_large_image","twitter_misc":{"Written by":"cosimo","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/#article","isPartOf":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/"},"author":{"name":"cosimo","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1"},"headline":"Ubiquity for Opera","datePublished":"2009-02-04T11:56:46+00:00","dateModified":"2009-02-04T11:56:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/"},"wordCount":134,"commentCount":0,"publisher":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1"},"image":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/#primaryimage"},"thumbnailUrl":"http:\/\/files.myopera.com\/cstrep\/blog\/ubiq.jpg","keywords":["extensions","firefox","opera","ubiquity","userjs"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/","url":"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/","name":"Ubiquity for Opera - Random hacking","isPartOf":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/#primaryimage"},"image":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/#primaryimage"},"thumbnailUrl":"http:\/\/files.myopera.com\/cstrep\/blog\/ubiq.jpg","datePublished":"2009-02-04T11:56:46+00:00","dateModified":"2009-02-04T11:56:46+00:00","breadcrumb":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/#primaryimage","url":"http:\/\/files.myopera.com\/cstrep\/blog\/ubiq.jpg","contentUrl":"http:\/\/files.myopera.com\/cstrep\/blog\/ubiq.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2009\/02\/ubiquity-for-opera\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.streppone.it\/cosimo\/blog\/"},{"@type":"ListItem","position":2,"name":"Ubiquity for Opera"}]},{"@type":"WebSite","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#website","url":"https:\/\/www.streppone.it\/cosimo\/blog\/","name":"Random hacking","description":"Assume nothing. Code defensively. Keep it simple, stupid!","publisher":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.streppone.it\/cosimo\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1","name":"cosimo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g","caption":"cosimo"},"logo":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/"},"url":"https:\/\/www.streppone.it\/cosimo\/blog\/author\/cosimo\/"}]}},"_links":{"self":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/posts\/532"}],"collection":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/comments?post=532"}],"version-history":[{"count":0,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/posts\/532\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/media?parent=532"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/categories?post=532"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/tags?post=532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}