Operaised -- The blog

Subscribe to RSS feed

Posts tagged with "Opera"

Add external feed reader links to opera's web feed reader in 9.60

, , ,

Although this version is currently in snapshot testing at the moment, the newest feature is to allow feeds to be previewed before subscribing to them. This uses a html wrapper page to view the feed so you can edit it how you want.

This page is in your "Styles" folder in the main opera installation(not in profile folder).

Right click and open using notepad.

Find this line:
button.addEventListener( 'click', function(){ opera.feeds.subscribeNative(location.href); }, false );


And put this code under the line:

heading.innerHTML+='
<a href="http://add.my.yahoo.com/rss?url='+location.href+'">[html:img 

src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif"]</a>[html:a 

href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url='+location.href+'"][html:img 

src="http://www.newsgator.com/images/ngsub1.gif"]</a><a href="http://feeds.my.aol.com/add.jsp?url='+location.href+'">[html:img 

src="http://o.aolcdn.com/myfeeds/html/vis/myaol_cta1.gif"]</a><a href="http://www.bloglines.com/sub/'+location.href+'">[html:img 

src="http://www.bloglines.com/images/sub_modern5.gif"]</a>[html:a 

href="http://www.netvibes.com/subscribe.php?url='+location.href+'"][html:img 

src="http://www.netvibes.com/img/add2netvibes.gif"]</a><a href="http://fusion.google.com/add?feedurl='+location.href+'">[html:img 

src="http://buttons.googlesyndication.com/fusion/add.gif"]</a>[html:a 

href="http://www.pageflakes.com/subscribe.aspx?url='+location.href+'"][html:img 

src="http://www.pageflakes.com/subscribe2.gif"]</a>
<a href="feed:'+location.href+'">External</a>';


And save.

feedreaderlinks.png

Now you should have links to add your feeds to other web based feed readers plus an external one if you choose.

Combining VBScript, Opera and Javascript for effective functions.

, , ,

Although VBScript is seemed to be a language only windows users can use, it can come in useful when automating commands in Opera can be a pain.

DIM Wsh,ArgObj,var1
Set ArgObj = WScript.Arguments
Set Wsh = WScript.CreateObject("WScript.Shell")
var1 = ArgObj(0) 
if var1 = "source" then
Do Until Wsh.AppActivate ("Selection source for")
WScript.Sleep 500
Loop
Wsh.SendKeys "^a"
Wsh.SendKeys "^c"
Wsh.SendKeys "^{F4}"
else 
Do Until Wsh.AppActivate ("Links Selected for")
WScript.Sleep 500
Loop
Wsh.SendKeys "^a"
Wsh.SendKeys "^c"
Wsh.SendKeys "^{F4}"
end if
Set Wsh = nothing
WScript.Quit


Here is example code of a VBScript,save this as copy.vbs and save it in your main program files > opera folder, what the script does is it looks for the active window title, then sends the key commands to copy the content and close the tab creating the content. One is for the selection source bookmarklet which is found here: http://my.opera.com/community/forums/topic.dml?id=140523

Here is an example to put in menu.ini file to run the VBScript first then run the javascript code.

Item, "Copy selected links/All links" = Execute Program, "copy.vbs","selectlinks" & Go to page, "javascript:(function(){ var html_selection=document.createElement('div'); var yay=[];  if(document.getSelection()){ html_selection.appendChild(window.getSelection().getRangeAt(0).cloneContents()); } if(!html_selection.getElementsByTagName('a')[0]) { document.designMode='on';document.execCommand('selectall', false, null);html_selection.appendChild(window.getSelection().getRangeAt(0).cloneContents());document.links[0].focus();document.designMode='off'; } var hmm=html_selection.getElementsByTagName('a'); for(var i=0;i<hmm.length;i++) {yay[i]=hmm[i].href};var ty=window.open();ty.document.write('<title>Links Selected for '+location.href+'</title>'+yay.toString().replace(/\,/g,'
'));ty.document.close();})(); "


This javascript function copies selected links to the clipboard, or copies all links of the page if no selection or the selection contains no links.

These are just examples of how VBScript can help Windows Opera users extend Opera's functionalities a tiny bit more smile

Creating a bar(using userjs) for opera

, ,

Opera doesn't have the abilty to create third party toolbars in a sense of grabbing variables and putting them inside its own UI, here is a short tutorial in how to create your own 'toolbar' using the power of UserJS.

First of all, define a variable to the bar that is created.
For example;

var toolbar = document.createElement('div');


Then add a style to the bar you have made, make sure positioning and height/width is defined and imo its better to have it like this:

toolbar.style='position:fixed;top:0;background-color:white;border:1px dotted black;';


And for reference, its best to add an id to the bar as reference for later.

toolbar.id='newbarw00t';


And to add the html content, use innerHTML. Like this:

toolbar.innerHTML='< a href="http://my.opera.com">opera community site</ a>';


And finally, append the bar to the page!

Don't use document.body as that takes in account the current pages style. Use document.documentElement instead; like this.

document.documentElement.appendChild(toolbar);




Source panel(sort of)

, , ,

Using a bit of Cross document messaging its possible to comminucate between different documents, using the power of UserJS I made a sort of source panel smile .

http://h1.ripway.com/shoust/UserJS/sendmessage.js

http://dhost.info/shoust/sendmsg.html

With the html page, all you do is type in an address, and upon pressing Go, opera will open the page, and when the document fully loads, the pages source is viewed inside the html page, It works inside the panel too.. so the best bet is to bookmark the html page or save it, install the userjs file, and instruct the html page to open a site you want the source from and voila.. thats it smile When the source is grabbed. The window opened will be closed smile Thats all there is to it.

EDIT: For all those trying it out, it is b0rked currently in 9p1, smile works in 8 and above i think smile