Wednesday, August 8, 2012 6:45:59 PM
script, extensions, extension, javascript
...
Recently in one of my blog posts I mentioned great library Require.JS. It has an API to load JavaScript snippets as modules. It works really great with popup files or with background file in speed dial extension.
Unfortunately, you can't use it in injected scripts for several reasons.
- Require.JS loads the snippets with script tags and we don't want to add any script tags to every page when our extensions is running.
- Even if it wouldn't be a problem we still can't load scripts from our extension package with script tag.
- Script tags also has it's own browser scope without the special Opera Extension APIs.
The conclusion is that Require.JS is useless when it comes to injected scripts. What we can do is to split our script to several injected script files. But such files have to use global scope to communicate and they are executed in alphabetical order.
Luckily, latest snapshot of Opera 12.50 Next has the new
Resource Loader API. It is just one function which returns reference to "File" object of any file in our extension oex package.
Read more...
Saturday, July 24, 2010 11:26:35 AM
AJAX, javascript, Library

I was looking for some good AJAX library, but I haven't found any suiting me. jQuery is too big and it's really not good idea to add it to web site just for AJAX. YUI is to complicated and it take me very long time until I was even able to realize which plug-in download. jx excess is quit good, but still not good enough. The only solution was to create my own library and here it goes:
Devilia AJAX Library v3.4Library:
http://is.gd/dEmoHEnglish documentation:
http://is.gd/dEpPCCzech documentation:
http://is.gd/dEmpsAdvantages:- Only 2kb size
- Minimal global pollution (only global object is AJAX)
- Timeout function that prevents you against NSL
- Front function that enables you to send more connection requests at once
- Fast performance
- Professional code
- Separate callback for success and for errors
- Works in Opera, Chrome, Firefox, Safari, Internet Explorer 7+
I think this is the
BEST AJAX Library! What do you think?