Showing posts with label Firefox. Show all posts
Showing posts with label Firefox. Show all posts

Tuesday, December 27, 2011

[How to] Use error console in Native UI for Firefox on Android

Developers use different techniques for debugging their web applications. Though there are lots of new techniques coming up in this space, one technique which is still widely used is console logging. Every browser (including the mobile browsers) supports this feature in some capacity. I have been using Firefox on my Nexus One and it has an in-built error console which can be enabled from about:config.  However, with the new native UI for Firefox on Android, this option does not seem to be available. Read through this post to find out how you can use error console in the native UI.

Error Console in Firefox Native UI

Firefox Native UI writes all the console messages to Android system log which can be read via logcat which comes along with the Android SDK.

  • Android SDK. Download and install the latest Android SDK from here. This comes up with all the tools needed for development and testing of your application. Once the SDK is installed, go to the location on which the SDK is installed. Run ‘adb logcat’ - this will show the complete log from Android system. To  view Firefox specific log messages, do a grep: ‘adb logcat | grep “Gecko”’. To view Firefox console messages alone, do a grep: ‘adb logcat | grep “GeckoConsole”’.
  • If you don't want to install Android SDK, you can use apps like aLogCat (Android app for viewing the logs). The app provides an option for filtering the logs and also comes with lots of other accessibility options.

Firefox Native UI - Conole logs

Firefox Native UI - Conole logs

-- Varun

Saturday, November 20, 2010

Use ‘GreaseFire’ to discover GreaseMonkey scripts

If you find a feature to be missing on your favorite site, you can request for the same from site admin / service provider. But, the process may take some time before you get the feature. GreaseMonkey is the way to go if you want to get it yourself quickly.

GreaseMonkey

GreaseMonkey allows you to customize any website to your taste. It was originally written as a Firefox add-on by Aaron Boodman (@aboodman) (currently working with Google). Eventually, Chrome 4 added support for GreaseMonkey scripts. A GreaseMonkey (popularly known as GM or user scripts) script is a JavaScript which executes on top of the original site with few security restrictions. It is easy to get started with GM scripts with minimal JavaScript knowledge. To get started on GM, check out this community documentation “GreasePot”. There is also a community to share the user scripts written by users all across the globe. Check it out here. http://userscripts.org

GreaseFire

Userscripts.org has thousands of scripts for different websites. So, before authoring a new script, check if the script exists already there. ‘GreaseFire’ is a tool to discover user scripts applicable for the current page. It is available as Firefox add-on and also as a Chrome extension. When ever you visit a site, GreaseFire will search the Userscripts.org directories and list down the users scripts which can be installed on that page. GreaseFire uses a ranking system to rank the scripts before listing them to you.

  • Firefox. Firefox users can download the add-on from here. The add-on is around 3 MB in size. After installing the add-on, it will add a icon in the Firefox status bar. Clicking on it will list down the user scripts available for the current site.

GreaseFire Firefox add-on GreaseFire - Firefox Add-on

  • Chrome. Chrome users can download the Chrome extension from here. The extension is around 13 MB in size. After installing the extension, a new icon will appear on the address bar indicating if the site has any user scripts. Click on the icon to see the available user scripts. 

GreaseFire - Chrome extension-- Varun

google-site-verification: googlea4d68ed16ed2eea6.html