firefox

Import Certificate into Firefox 3.6.12

This challange will help you to import a Code Signing Certificate into Firefox

Firefox add-on TamperData

The data sent by the POST method can be easily altered by the TamperData add-on of the Firefox.
It can be downloaded from the https://addons.mozilla.org/sk/firefox/addon/966/ .
After the installation the Firefox is restarted. TamperData can be accessed inside of the 'Tools' menu.
After its start a window appears. By clicking on the 'Start Tamper' it starts watching for a sent data and asks whether it should be tampered. If so, another window appears showing all the keys and assigned values which can be easily changed.

Taggings:

Working Javascript event handling or IE and Mozilla

The most important step is to retrieve the browser version in Javascript. When we know with which Browser we are dealing we can differ between the necessary commands which have to be executed. The following code shows the differences between IE 8 (and older) and Mozilla


function createSafeListener(toField, listenerType, functionToDo) {
var appName = navigator.appName;
if (appName == 'Microsoft Internet Explorer') {
toField.attachEvent('on' + listenerType, functionToDo);
} else {
toField.addEventListener(listenerType, functionToDo, false);
}
}

This function lets call it "createSafeListener" accepts 3 parameters

  • toField - The field where the event should be attached to
  • listenerType - The type of listener we need (i.e. onChange, onClick, ...)
  • functionToDo - The function which should be executed when the event fires
    • The differences we see is that IE uses attachEvent instead of addEventListener. The second difference is IE expects something as "onChange", while Mozilla only needs "change" and moreover Mozilla has an additional parameter which i dont explain in details here (false is sufficient in most cases).

      When we have this function we can use it easily for implementation i.e.:


      var noField = document.getElementById('other_1_count');
      createSafeListener(noField,'change',function() { setCount(this); });
      createSafeListener(noField,'keyup',function() { setCount(this); });

      You would think we are done now .. but not yet there is still another problem we have to consider. When the desired function is call, we possibly need access to the corresponding field from which it was called, there is also again a difference between IE and Mozilla, see below


      var appName = navigator.appName;
      if (appName == 'Microsoft Internet Explorer') {
      if (window.event.srcElement) {
      elem = window.event.srcElement;
      }
      }

      In case of IE the parameter "this" of setCount(this) will be null, so we have to check again on which browser we are working and use the correct function of IE which is window.event.srcElement

Taggings:

Use of Greasemonkey to fix the accessibility issues

With use of the Greasemonkey add-on for Firefox we are able to alter any page with accessibility issues (and even do much more). Greasemonkey allows the user to customize the way a webpage is displayed using JavaScript. There is even a lot of scripts for various sites available at http://userscripts.org/ .

To fix the issues you need to:

  1. Download Greasemonkey: https://addons.mozilla.org/sk/firefox/addon/748/
  2. In the 'Tools' menu item you have to enable Greasemonkey and then click on 'New user script'
  3. In the 'New user script' dialogue fill in the name of the script, the namespace of the script, its description and the sites is should run on ('Include rules') and which pages the script should not be started on ('Exclude rules' , typically * for all other pages). Click on 'OK' button.
  4. Now you default text editor appears and you can write you script. Note that Greasemonkey generated a header for you script containing the name, namespace, etc. If you want to change these values later, you should do it in the header but also in the 'Tools>Greasemonkey>User scripts management'
  5. Now you can alter the website using standard DOM functions of the JavaScript. Here is a small example:

    //Adding alt text to the main banner
    var titleimg = document.getElementById('title-img');
    titleimg.alt = "ACME, Ltd.";

Taggings:

Open Remote Tabs

Nowadays, there are many different browsers available. Sometimes we want or have to change between them because every browser has its advantages and disadvantages. Furthermore, at work, people often use a different browser (e.g. Internet Explorer) than at home (e.g. Google Chrome, Mozilla Firefox). Now, when coming home, there should be an easy way to re-open the tabs they had open at work or simply at a different location. Every modern browser allows to open many tabs. However, it is not easy to move these tabs from one browser to another. Challenge: <ul><li>Find an <strong>easy</strong> way to open tabs in the browser of your choice that you recently opened in another browser.</li><li>Choose at least <strong>two</strong> different browsers to work with.</li><li>This should also work when the remote browser is already closed.</li></ul>

Testing of WEB based applications

In order to test a WEB application the communication between server and client must be recorded and played back. As client side scripting (such as JavaScript) is used the client is also relevant for the testing process.

Use Google Image Relinker Mod

Userscripts.org is a sharing platform for scripts which modify the look and/or feel of websites. Such scripts usually manipulate the DOM-tree and CSS attributes of HTML documents. One particularly useful script for me is Google Image Relinker Mod. It rewrites the links from the result view of Google Image Search to point directly to the image file instead of the intermediary landing page.

To get the script working, follow the following steps:

  1. Make sure your browser supports user scripts (i.e. you use either Firefox, Seamonkey or Opera)
  2. When using Firefox, install the Greasemonkey extension
  3. Install the Google Image Relinker Mod script via the install-button on its site
  4. Make sure that the script is enabled in Greasemonkey (click the monkey on the bottom of Firefox to fire up the relevant pane) and enjoy your de-bloated version of Google Images
  5. .

Note: The links of the images in the search result list still point to the intermediate result site but the links of the images which are displayed when you hoover over the results, link to the actual files.

Enabling Java in Firefox 3.6

1. Since Firefox 3.6, the Java is treated just like all other plugins and no longer has a enable check box in Tools > Options > Content. We can enable or disable Java plugin (and also all plugins) via Tools > Add-ons > Plugins.

2. What if the Java plugin does not appear in Tools > Add-ons > Plugins (you can also checked it by typing about:plugins in the address bar). It means that you have to install Java (before you can use Java in your Firefox). Since Firefox 3.6 and later versions you need the Next-Generation Java™ Plug-In present in Java 6 U10 and later.
These are how you can do it in various operating system (taken from http://kb.mozillazine.org/Java):

On Mac OS X
You can use the Mac OS X Software Update feature to update Java.
Note: The Java Embedding Plugin is bundled with current Mac distributions of Mozilla browsers, including Firefox and SeaMonkey. This utility allows browsers other than Apple's Safari to use the most recent versions of Java on Mac OS X.

On Linux
1. Download the Linux version of the Java software.
2. When the download is finished, execute the .bin file as root and follow the prompts.
3. When the installation has completed, run this command in the plugins directory of your Firefox installation:
ln -s /your_path_here/java/j2re1.5.0/plugin/i386/ns7/libjavaplugin_oji.so libjavaplugin_oji.so
4. Firefox 3.6 and later need the Next-Generation Java Plug-In
See Manual Installation and Registration of Java Plug-in for Linux (at java.sun.com)
Run this command in the plugins directory of your Firefox installation to create a symbolic link to the Java plugin (replace xx with the current Java version):
ln -s /usr/your_path_here/java/jre1.6.0_xx/lib/i386/libnpjp2.so libnpjp2.so

On Solaris Intel
1. Install the Solaris Intel version of the Java JRE or SDK.
2. When the installation has completed, run this command in the plugins directory of your Firefox installation:
ln -s /your_path_here/jre/plugin/i386/ns610/libjavaplugin_oji.so .

On Windows
Automatic update: The Java Update feature automatically checks for updates in Windows 2000/XP/Vista at scheduled intervals and notifies you when an update is available so that you can install it. If you have administrative privileges, you can also check for updates yourself and install them from the Java Control Panel (Start -> Control Panel -> Java -> "Update" tab).

Manual install or update:
1. Go to Java.com and click on the Free Java Download button.
2. Click on the Download Now button to start the online installation.
3. Close and restart your browser after the installation is complete.
If you prefer an offline installation, go to the Java SE Downloads page (see above for links) select the Java SE Runtime Environment (JRE) and save the offline installer (e.g., "jre-6u10-windows-i586-p.exe" for JRE 6 Update 10) to any convenient location, close your browser and run the installer.

Important: Previous to JRE 6 Update 10, installing or updating to a newer Java version would add a new Java Runtime Environment (JRE) instead of replacing the existing version. For example, if you already have JRE 6 Update 7 installed and later install JRE 6 Update 10, you would end up with two JRE versions installed in separate directories. You can remove older Java versions via Windows Control Panel "Add or Remove Programs", to save disk space and because older versions often contain security vulnerabilities.

Starting with JRE 6 Update 10, future Java updates will patch the current version by default instead of adding an additional version. For example, if you previously installed JRE 6 Update 10 in the C:\Program Files\Java\jre6 directory, and in the future you install JRE 6 Update 14, the version 6u14 installer does not create a new directory. Instead, it updates the pre-existing "jre6" directory with the new 6u14 content (JRE Update 10 will no longer exist). This will prevent an accumulation of unused and potentially insecure older JRE versions.

How to enable Java in Firefox 3.6

Since Firefox 3.6, the option box to enable Java (not javascript) in Preferences->Content is disappeared. Now, the question is: how to enable Java content pages in Firefox 3.6 or later? Because, on one side sometimes there is an important site for us that need Java. And in another side, some of us prefer to use Firefox (than any other internet browsers) and do not want to change our default browser to any other browsers.

How to automatically modify web content locally

Web pages do not always provide the design we want them to. There are web pages which one visits very frequently and which one would like to modify slightly. Such modifications would be for example: a different font, to resize a part of the page or to eliminate a part of the page.

Pages

Subscribe to firefox