Friday, July 9, 2010

APEX 4.0 Builder Hotkeys

Until recently I only developed in Oracle APEX using Mozilla Firefox. Partly because of the add-ons (like Firebug), but most of all because of Patrick Wolf's Oracle APEX Builder Plugin. It can be really annoying at times to scroll and click to apply changes.

After upgrading to APEX 4.0, the APEX Builder Plugin stopped working. I tried a quick and dirty approach, and updated the config files to look for button-elements instead of input-elements, but that did not work.

Enter Google Chrome
I've been using this browser on and off for some time, and it is incredibly fast compared to Firefox (even without add-ons, I checked). I did a bit of research (sounds better than a quick google search :-)), and found that Chrome supports Greasemonkey scripts natively. How nice! If only I had a Greasemonkey script that worked, that is...

So, I had to make my own. It's an absolute first try, so don't hold your breath. I have probably made any number of rookie mistakes, feel free to correct me :-)

Greasemonkey?
Greasemonkey is a Mozilla Firefox add-on which can run scripts after page load, and do pretty much everything with it. Greasemonkey scripts are nothing but javascript with some "special" declarations at the beginning of the file, but runs in it's own sandbox.

Google Chrome understands and runs Greasemonkey scripts as add-ons (no install of Greasemonkey necessary). Chrome was my target after all.

APEX 4.0 Builder Hotkeys
This is nothing like the more sophisticated Builder Plugin from Patrick Wolf, I have only aimed at the dearly missed hotkeys (or shortcut keys if you will).

Hotkeys implemented so far:
  • F8 - Run page
  • F9 - Apply Changes
  • Alt + F9 - Click the orange button
  • Alt + PageUp - Click button named "<" or "< Previous"
  • Alt + PageDown - Click button named ">" or "Next >"

Install
Installation instructions for both Chrome and Firefox:
  • Point browser to http://userscripts.org/scripts/show/81058
  • Click green Install-button to the right
  • Click Install in the dialog (In Chrome: Click Continue at the bottom of the page, and then Install in the dialog)

Firefox users have to install Greasemonkey before installing the script above. I have hosted the script at userscripts.org. Have a look around while you are there, the number of scripts (and the crazy things people do to web pages) is just staggering.

Uninstall
Chrome:
  • Point the browser to chrome://extensions/
  • Click Uninstall under the "Oracle APEX 4.0 Builder Hotkeys" extension.

Firefox:
  • Right click the little monkey in the lower right corner of the window
  • Choose Manage User Scripts
  • Click "Oracle APEX 4.0 Builder Hotkeys" on the left
  • Check "Also uninstall associated preferences"
  • Click Uninstall

Some Notes
I had to revert to JQuery 1.3.2 to make it play nice with Greasemonkey. I know there are ways make it work for 1.4.x, but I am not using JQuery to it's full potential (only simple selectors and click-events). I didn't even bother trying. I also had to include the whole script to make it work with Chrome (no external references).

There might be some problems with namespacing and JQuery conflicts, but I have encountered none so far.

Feel free to modify the scripts, or to make enhancement requests (hey, I might even do something about them. It could happen! Really!)

So, will I retire Firefox now? Nope, Firebug, YSlow, WebDeveloper, etc. are all good reasons not to. I am not that comfortable with the Chrome developer tool.

4 comments:

  1. Hi Håvard,

    Good to see that others are interested in the Builder Plugin, too.

    Are you interested to merge your changes into a new version of the APEX Builder Plugin?

    Peter

    ReplyDelete
    Replies
    1. Monkey On Oracle: Apex 4.0 Builder Hotkeys >>>>> Download Now

      >>>>> Download Full

      Monkey On Oracle: Apex 4.0 Builder Hotkeys >>>>> Download LINK

      >>>>> Download Now

      Monkey On Oracle: Apex 4.0 Builder Hotkeys >>>>> Download Full

      >>>>> Download LINK er

      Delete
  2. Hi Peter,

    I have no plans for that.

    If you look at Patrick's scripts (and the whole ecosystem built around it really), it will take quite a bit of time. Not to mention skills at javascripting.

    I have neither for the time being.

    It would be nice with a new version of the Builder Plugin though :-)

    Regards,
    Håvard

    ReplyDelete
  3. Hi Håvard ,

    it took a while to find some spare time, but finally i launched a new version of the BuilderPlugin.

    It runs now with APEX 4.0, see my posting for more details: http://www.oracle-and-apex.com/famous-apex-builder-plugin-now-ready-for-apex-4-0/

    Peter

    ReplyDelete