[Ext] userChromeJS 2.0 [2015-08-02]

Announce and Discuss the Latest Theme and Extension Releases.
Locked
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: [Ext] userChromeJS 1.5 [2012-01-22]

Post by morat »

@alta88

Could you upload an update to Rod Whiteley's chrome.xpi extension to the userchromejs folder?

I can ask rsx11m to update the Bindings page with the new link.

chrome.manifest

Code: Select all

content userchrome ../../chrome/

install.rdf

Code: Select all

<?xml version="1.0"?>

<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:em="http://www.mozilla.org/2004/em-rdf#">

  <Description about="urn:mozilla:install-manifest">

    <em:id>chrome@user</em:id>
    <em:name>User Chrome</em:name>
    <em:version>1.1</em:version>
    <em:type>2</em:type>
    <em:unpack>true</em:unpack>
    <em:creator>Rod Whiteley</em:creator>
    <em:description>User chrome enabler.</em:description>

    <em:targetApplication><!-- Firefox -->
      <Description>
        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
        <em:minVersion>4.0</em:minVersion>
        <em:maxVersion>99.*</em:maxVersion>
      </Description>
    </em:targetApplication>

    <em:targetApplication><!-- Thunderbird -->
      <Description>
        <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
        <em:minVersion>5.0</em:minVersion>
        <em:maxVersion>99.*</em:maxVersion>
      </Description>
    </em:targetApplication>

    <em:targetApplication><!-- SeaMonkey -->
      <Description>
        <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
        <em:minVersion>2.1</em:minVersion>
        <em:maxVersion>99.*</em:maxVersion>
      </Description>
    </em:targetApplication>

    <em:targetApplication><!-- Gecko Toolkit -->
      <Description>
        <em:id>toolkit@mozilla.org</em:id>
        <em:minVersion>2.0</em:minVersion>
        <em:maxVersion>99.*</em:maxVersion>
      </Description>
    </em:targetApplication>

  </Description>

</RDF>

zip chrome.zip chrome.manifest install.rdf
ren chrome.zip chrome.xpi
Last edited by morat on February 11th, 2013, 9:24 am, edited 1 time in total.
alta88
Posts: 1029
Joined: January 28th, 2006, 3:08 pm

Re: [Ext] userChromeJS 1.5 [2012-01-22]

Post by alta88 »

could you explain what that is and what this is about?
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: [Ext] userChromeJS 1.5 [2012-01-22]

Post by morat »

Sorry, I didn't explain well.

Rod Whiteley wrote the User Chrome extension a few years ago to enable the use of bindings in the chrome folder. The extension is just an enabler - it has no effect at all on its own. The extension broke in Gecko 2.0 because xpi files are no longer unpacked when extensions are installed. Rod Whiteley is no longer an active member of the forum so I was wondering if you would update and host the extension. You would only need to add the unpack property and SeaMonkey compatibility to the install.rdf file.
User avatar
Philip Chee
Posts: 6475
Joined: March 1st, 2005, 3:03 pm
Contact:

Re: [Ext] userChromeJS 1.5 [2012-01-22]

Post by Philip Chee »

morat wrote:Sorry, I didn't explain well.

Rod Whiteley wrote the User Chrome extension a few years ago to enable the use of bindings in the chrome folder. The extension is just an enabler - it has no effect at all on its own. The extension broke in Gecko 2.0 because xpi files are no longer unpacked when extensions are installed. Rod Whiteley is no longer an active member of the forum so I was wondering if you would update and host the extension. You would only need to add the unpack property and SeaMonkey compatibility to the install.rdf file.

Isn't Alice0755 still maintaining a fork of userChromeJS?

Phil
alta88
Posts: 1029
Joined: January 28th, 2006, 3:08 pm

Re: [Ext] userChromeJS 1.5 [2012-01-22]

Post by alta88 »

sure, i can add that xpi. if mozdev commit comes back, not working at the moment.
delicacy
Posts: 400
Joined: February 3rd, 2013, 4:09 pm

Re: [Ext] userChromeJS 1.5 [2012-01-22]

Post by delicacy »

"alta88

Post Posted October 16th, 2012, 10:02 am
there's no fix because there's no bug"

Wrong .. .

userchromeJS is incompatible with the actual versions of firefox & badly interfering, it disables the toolbar customization & removes the icons from its palette.

A userchromeJS 1.6 would be welcomed.
User avatar
Alice0775
Posts: 2817
Joined: October 26th, 2007, 11:25 pm
Location: OSAKA

Re: [Ext] userChromeJS 1.5 [2012-01-22]

Post by Alice0775 »

Updating bug add-on userChromeJS to version 1.6 from 1.5:
[*]#1060747 [Toolkit:Add-ons Manager]-Add-on does not run after update the Add-on [Win]
User avatar
jorgev
Posts: 53
Joined: May 26th, 2005, 9:54 am
Location: Costa Rica

Re: [Ext] userChromeJS 1.5 [2012-01-22]

Post by jorgev »

Jorge Villalobos
Add-ons Developer Relations Lead, Mozilla
alta88
Posts: 1029
Joined: January 28th, 2006, 3:08 pm

Re: [Ext] userChromeJS 2.0 [2015-08-02]

Post by alta88 »

userChromeJS v2.0 has been released; this version is signed and also requires any prior version to be removed before it is re-installed/downloaded from the homepage.
liuxb
Posts: 5
Joined: March 21st, 2010, 5:36 am

Re: [Ext] userChromeJS 2.0 [2015-08-02]

Post by liuxb »

@alta88

It seens that there is conflict between userChromeJS 2.0 and Downloadthemall! 3.0.x. I can't MANUALLY add download link in DTA, when userChromeJS 2.0 installed.
Steps To Reproduce:
create a clean profile, install both DTA 3.0.5 and userChromeJS 2.0, restart firefox.
menubar - tools - Downloadall Tools - Manager, click "manually add a download to downloadthem all" button, type any url MANUALLY, there will be a red frame indicates an error.
snapshots:
http://i.imgur.com/5DZ1MLG.png
http://i.imgur.com/HB0WD1U.png
http://i.imgur.com/y2tSw54.png
http://i.imgur.com/SdsJdMR.png
When click "manually add a download to downloadthem all" button, I get this message "09:59:56.678 uncaught exception: 21475000371DownloadIntegration.jsm:785:12" in log console.
I have reported this issue to DTA team:
https://github.com/downthemall/downthemall/issues/49
Can you fix this problem, thanks!
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: [Ext] userChromeJS 2.0 [2015-08-02]

Post by morat »

@alta88
liuxb wrote:conflict between userChromeJS 2.0 and DownThemAll! 3.0.5
I get an error if I remove the outer try catch block in the Dialog.download function in the addurl.js file.
TypeError: Services.fixups is undefined
These services don't get defined in the glub.jsm file when userChromeJS is enabled.

Services.catman
Services.clipboardhelper
Services.clipbrd
Services.eps
Services.favicons
Services.fixups
Services.httphandler
Services.memrm
Services.mime
Services.mimeheader
Services.pps
Services.sysprincipal
Services.ttsu
Services.uuid
Services.wintaskbar

view-source:chrome://dta/content/dta/addurl.js
view-source:chrome://dta-modules/content/glue.jsm

http://github.com/downthemall/downthema ... /addurl.js
http://github.com/downthemall/downthema ... s/glue.jsm
Nils Maier
Posts: 4
Joined: June 8th, 2007, 1:16 pm
Contact:

Re: [Ext] userChromeJS 2.0 [2015-08-02]

Post by Nils Maier »

Yeah, userchrome breaks the world for DownThemAll!...
https://github.com/downthemall/downthemall/issues/94

Fixing it is probably easy enough: Don't pollute the "scope" with your stuff.
E.g. like so:

Code: Select all

var userChrome = (function() {
  // anonymous scope
  
  const {Services} = Components.utils.import("resource://gre/modules/Services.jsm", {} /*anonymous*/);
  let whatever = something;
  // exported
  return {
    info() {
       return `This is userChrome running in a ${document.location.href}  window on  ${Services.appinfo.name}`;
    }
    ...
  };
})();

Components.utils.reportError(userChrome.info());
alta88
Posts: 1029
Joined: January 28th, 2006, 3:08 pm

Re: [Ext] userChromeJS 2.0 [2015-08-02]

Post by alta88 »

from the linked bug report, it appears the problem is the Components.* shortcut definitions in global scope. this was removed in v2.0 so it's not clear what the problem is. did the user uninstall old userChrome before installing v2.0 as noted on the home page?
Nils Maier
Posts: 4
Joined: June 8th, 2007, 1:16 pm
Contact:

Re: [Ext] userChromeJS 2.0 [2015-08-02]

Post by Nils Maier »

alta88 wrote:from the linked bug report, it appears the problem is the Components.* shortcut definitions in global scope. this was removed in v2.0 so it's not clear what the problem is. did the user uninstall old userChrome before installing v2.0 as noted on the home page?
If you were replying to me, the issue is that userChromeJS imports Services.jsm, but DownThemAll!'s |Services| object !== Services.jsm |Services| object. We layer a bunch of stuff on top of the Services.jsm version: https://github.com/downthemall/downthem ... #L151-L211

The more general issue is: userChromeJS "pollutes" the scope (namespace) of all windows it injects itself into. The ideal solution would be for userChromeJS to avoid creating/changing any new globals, or at least only add the "userChrome" global and only that. That also means that |Cu.import()| has to be called with a second argument (the scope argument) and that has to be different to the window/global scope
alta88
Posts: 1029
Joined: January 28th, 2006, 3:08 pm

Re: [Ext] userChromeJS 2.0 [2015-08-02]

Post by alta88 »

why should anyone else be concerned with or affected by your "layers"? importing the system Services.jsm object as |Services| is a... service of userChromeJS, and having this available to all is not exactly global namespace pollution. in fact, Services is imported or "require"ed by very many things and all that's happening here is that you counted on being the last one to grab and hack it. right? any other extension can come along and has no greater or lesser right to modify Services; if it's loaded after your's, it will clobber you.

you should find a better solution for your monkeypatching. or, i'd be glad to give you ownership of userChromeJS ;)
Locked