Home > OperaLink.js

OperaLink.js

OperaLink.js is a project mainly written in JAVASCRIPT and SHELL, based on the View license.

JavaScript library for interacting with Opera Link

OperaLink.js 0.91 alpha

This is a JavaScript library for interacting with Opera Link. See operalink.js for usage details.

The only files you need to add to your project are the three script files in the build directory: operalink.js, oauth.js, and sha1.js. Everything else in the src directory is an example extension used to test that the library actually works.

While designed for use with Opera Extensions, this library should be usable in any context where cross-domain XML HTTP requests are allowed. You will need to do a couple extra things to make it work in other contexts:

  1. set opera.link.authorizeFunction. This callback is called when the user should be redirected to a web page so they can authorize your application to connect to Opera Link. It is passed a URL and simply needs to open it.

  2. set opera.link.storage. This sets the storage object used when saving/loading OAuth information. It defaults to widget.preferences if it is available, and localStorage if it is not. If you do not use opera.link.saveToken or opera.link.loadToken, you can ignore this setting.

The build and makedoc scripts in the root directory work with my own Cygwin setup. They may require some modification to work in a normal Linux environment. makedoc also requires JSDoc ( http://code.google.com/p/jsdoc-toolkit/ )

TODO:

  • Finish testing things
  • Write import functions

For more information:

https://github.com/ChaosinaCan/OperaLink.js http://my.opera.com/spadija/

Credits:

Ayke van Laethem (https://github.com/aykevl93) for Chrome compatibility fixes The OAuth library used is from http://oauth.googlecode.com/svn/code/javascript/