Can the firefox addon be modified ?

Discussion in 'General Chat' started by justinlorder, Feb 3, 2009.

  1. #1
    As we all know FF have tons of useful addons and they are .xpi extension .
    I enjoy them too .

    Now I find a disadvantage one of my FF addon .
    I want to modify the .xpi file to make it a more perfect addon .
    Is it possible ? Do I have to learn to program to modify a .xpi addon ?
     
    justinlorder, Feb 3, 2009 IP
  2. mayday77

    mayday77 Guest

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    if you modify it,will it crash firefox itself,but I don't know,I don't think it can,but maybe someone who more expert can help you
     
    mayday77, Feb 3, 2009 IP
  3. Big0ne

    Big0ne Well-Known Member

    Messages:
    2,615
    Likes Received:
    81
    Best Answers:
    0
    Trophy Points:
    165
    #3
    Why don't you simply edit .xpi with Notepad++ or any other software.
     
    Big0ne, Feb 3, 2009 IP
    jackass2007 likes this.
  4. jackass2007

    jackass2007 Peon

    Messages:
    2,379
    Likes Received:
    267
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yes, you can modify it on Notepad as suggested by Big0ne.

    Modifying doesn't necessarily mean Firefox will crash! I did some tweaking and see no erratic behavior. ;)
     
    jackass2007, Feb 3, 2009 IP
  5. ActiveFrost

    ActiveFrost Notable Member

    Messages:
    2,072
    Likes Received:
    63
    Best Answers:
    3
    Trophy Points:
    245
    #5
    Open With -> Notepad ( th, it may be encryped ) :rolleyes:
     
    ActiveFrost, Feb 3, 2009 IP
  6. justinlorder

    justinlorder Peon

    Messages:
    4,160
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I try notepad++ to open the several .xpi addons, all of them are mess code .
    I guess .xpi can't be edit with notepad++ .
    Any more suggestions that really work.
     
    justinlorder, Feb 3, 2009 IP
  7. James0142

    James0142 Guest

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I had to figure this out to modify an addon a while back, here goes:

    The .xpi is some form of compressed archive, I use 7-Zip, others might work as well. Neat feature of 7-Zip is right-click (menu key?), 7, t to test archive and compatability all from keyboard.
    I installed the addon before modifying (don't even want to recreate the install procedure, waste of time for my purposes).

    The addon folder should be in your profile path, take note when you install the addon then look for a folder matching that date/time (um, Alt+V, D in explorer, I only mention this because people actually use the other views, for some reason...).
    You might see folders in there following a few different naming conventions like:
    {12345678-1234-1234-1234-123456789012}
    or addon@name
    or addon@name.domain.foo

    Browse to chrome folder and un(zip?) the .jar file into a folder of the same name without jar extension (contents should be something like: content, locale, skin).
    So you have ./extensions/addonfolder/chrome/jarfilename/ (from your profile folder).

    Now edit the ./extensions/addonfolder/chrome.manifest file in Notepad++ (of course).
    Save the original file to a backup chrome.manifest-original or something
    Change the references of jar:chrome/jarfilename.jar!/
    to chrome/jarfilename/

    Now you can edit the CSS, JS, and other files in ./extensions/addonfolder/chrome/jarfilename/(content, locale, skin). You may need to reload the addon instance (close/open), or reload FF to see your mods or some other trick you'll discover while using...

    BTW I went through this process to hack up a way to edit ScrapBook captures with the XinhaHere! editor (both FF addons). Also, ScrapBook Copyinfo addon made it super easy to grab the file location to open in XinhaHere!.

    Peace and good luck!
     
    James0142, Aug 12, 2009 IP