Archives par mot-clé : Firefox

Utiliser firefox en intranet

La plupart des intranets « tout Microsoft » utilisent NTLM pour authentifier les utilisateurs sur les sites.

Si Firefox supporte bien le NTLM, par défaut, il faut saisir son mot de passe à chaque visite. C’est parce que Firefox ne fait pas confiance au site qui demande le jeton NTLM. Pour que Firefox ait confiance, il suffit d’ajouter le site dans network.automatic-ntlm-auth.trusted-uris

Pour cela, visiter la page « about:config », accepter l’avertissement.

Chercher « ntlm » pour trouver le paramètre network.automatic-ntlm-auth.trusted-uris. Indiquer ici les sites visités, séparés par des virgules.

Dijjer this! v. 0.1.2

This new release is to fix a feature request by Ungenio

when I right click inside a page (not on a link) the “Save with dijjer…” option is at the very top along with “Back”, “Forward”, etc… Could it be moved to be in the “Save Page As…” area?

Yes it can 😉 I have made the change in version 0.1.2.

Indeed, my dijjer menuitem was after « Save Link As » — and when firefox is not over a link it doesn’t display « Save Link As » and « Dijjer this! » was on top of the context menu, before the « Back » menuitem which wasn’t very user-friendly. At first, I tried to extend insertafter in my overlay

  <menuitem id="context-dijjethis" 
            insertafter="context-savelink, context-savepage"

Unfortunately, in case the context menu was not called on a link, « Save Link As » is hidden but still exists on top of the list. Thus my « dijjer this! » menu item was still on top. Arggg.

So, it was actually much harder to implement than what I was expecting. I had to define 2 menuitems (the former being « Save Page with Dijjer », the latter being « save Link with Dijjer ») and hide the one or the other depending on the context (exactly like mozilla does). The XUL overlay remains simple:

<popup id="contentAreaContextMenu" onpopupshown="DijjerthisMenu.init();">
  <menuitem id="context-dijjerpage" 
    <menuitem id="context-dijjerlink" 

But the javascript overlay requires a function to show or hide the items:

  //show or hide items depending on the context
  showItems: function() {
	var menuitem_page = document.getElementById("context-dijjerpage");
    var	menuitem_link = document.getElementById("context-dijjerlink");

    if (gContextMenu.onSaveableLink) {
     // Save+Send link depends on whether we're in a link.
     else if (!( gContextMenu.inDirList || gContextMenu.isContentSelected || gContextMenu.onTextInput || gContextMenu.onLink || gContextMenu.onImage )){

And this function much be called each time the popup menu is displayed:

    // I can't use gContextMenu because it is not initialized yet
    var contextMenu=document.getElementById("contentAreaContextMenu");
    contextMenu.addEventListener("popupshowing", DijjerthisMenu.showItems, false);

Enough technical details for now. Read the code if you want more 😉 And do give critics agains my code, I reach my upper limits in Javascript!