[jitsi-dev] Modifying Jitsi-Meet


#1

Hello,

I would like to modify/add some features to Jitsi-Meet. there's two
JavaScript files under libs directory :
app.bundle.js
app.bundle.min.js

When I use app.bundle.js instead of app.bundle.min.js for tests I get this
error :
Uncaught ReferenceError: $ is not defined

they don't have the same content ? Do you have any idea how to make some
changes on Jitsi-Meet ?

Regards,

···

--
______________________________________________
Hamza Khait


#2

App.bundle.js is a compiled JS file that is created when running the Makefile that resolves all of the require js parts using browserify.
App.bundle.min.js is the "minified" version of app.bundle.js

You don't really want to modify app.bundle.js directly, rather the correct way to do it would be to go to the individual js files in lib etc. then run the Makefile that will browserify and minify. Ultimately the html code refers to the minified version, which is why you were seeing errors.

Google JavaScript minification if you don't understand this concept, should easily be able to find many resources to explain this and why it's a good thing to do.

···

On Jan 13, 2016, at 7:37 AM, Hamza Khait <hamza.khait@gmail.com> wrote:

Hello,

I would like to modify/add some features to Jitsi-Meet. there's two JavaScript files under libs directory :
app.bundle.js
app.bundle.min.js

When I use app.bundle.js instead of app.bundle.min.js for tests I get this error :
Uncaught ReferenceError: $ is not defined

they don't have the same content ? Do you have any idea how to make some changes on Jitsi-Meet ?

Regards,

--
______________________________________________
Hamza Khait
_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#3

Just as a side note -- if it's for some really small modifications
(ones that won't make you lose yourself in the minified code), you can
edit the minified version for testing purposes.

Consider the min.js the compiled program and the individual js files
in lib -- the source code. You can always change the compiled program
if you know your way around. Use for testing and take care when
upgrading from upstream, as these changes will get overwritten.

···

On Wed, 13 Jan 2016 08:04:48 -0500 Chris Wendt wrote:

App.bundle.js is a compiled JS file that is created when running the
Makefile that resolves all of the require js parts using browserify.
App.bundle.min.js is the "minified" version of app.bundle.js

You don't really want to modify app.bundle.js directly, rather the
correct way to do it would be to go to the individual js files in lib
etc. then run the Makefile that will browserify and minify.
Ultimately the html code refers to the minified version, which is why
you were seeing errors.

Google JavaScript minification if you don't understand this concept,
should easily be able to find many resources to explain this and why
it's a good thing to do.

On Jan 13, 2016, at 7:37 AM, Hamza Khait <hamza.khait@gmail.com> >> wrote:

Hello,

I would like to modify/add some features to Jitsi-Meet. there's two
JavaScript files under libs directory : app.bundle.js
app.bundle.min.js

When I use app.bundle.js instead of app.bundle.min.js for tests I
get this error : Uncaught ReferenceError: $ is not defined

they don't have the same content ? Do you have any idea how to make
some changes on Jitsi-Meet ?

--

Yasen Pramatarov
Lindeas Ltd. https://lindeas.com
'working on GNU/Linux ideas'
Professional Jitsi Meet services


#4

Hi Hamza,

>App.bundle.js is a compiled JS file that is created when running the
>Makefile that resolves all of the require js parts using browserify.
>App.bundle.min.js is the "minified" version of app.bundle.js

But this can be kind of a pain. There should be no reason you cannot
switch from serving the minified to serving the full version and having
it work. After figuring out what needed modification, then one could go
back and find the original source. It's six one way, half a dozen the
other.

>
>You don't really want to modify app.bundle.js directly, rather the
>correct way to do it would be to go to the individual js files in lib
>etc. then run the Makefile that will browserify and minify.
>Ultimately the html code refers to the minified version, which is why
>you were seeing errors.
>
>Google JavaScript minification if you don't understand this concept,
>should easily be able to find many resources to explain this and why
>it's a good thing to do.
>

Regardless of minification, the error shouldn't occur.

>>
>> Hello,
>>
>> I would like to modify/add some features to Jitsi-Meet. there's two
>> JavaScript files under libs directory : app.bundle.js
>> app.bundle.min.js
>>
>> When I use app.bundle.js instead of app.bundle.min.js for tests I
>> get this error : Uncaught ReferenceError: $ is not defined
>>
>> they don't have the same content ? Do you have any idea how to make
>> some changes on Jitsi-Meet ?

I think I ran into the same issue before, but I can't find that exact
error in my notes. If it is the same as what I ran into, the issue can
be resolved by one of two routes:

1) Remove some problematic characters from strophe-plugins
https://github.com/strophe/strophejs-plugins/pull/88

2) Declare a utf-8 charset in index.html
https://github.com/jitsi/jitsi-meet/pull/429

Ideally both.

Hope this helps,

Jesse

···

On Wed, 2016-01-13 at 15:25 +0200, Yasen Pramatarov wrote:

On Wed, 13 Jan 2016 08:04:48 -0500 Chris Wendt wrote:
>> On Jan 13, 2016, at 7:37 AM, Hamza Khait <hamza.khait@gmail.com> > >> wrote:

Just as a side note -- if it's for some really small modifications
(ones that won't make you lose yourself in the minified code), you can
edit the minified version for testing purposes.

Consider the min.js the compiled program and the individual js files
in lib -- the source code. You can always change the compiled program
if you know your way around. Use for testing and take care when
upgrading from upstream, as these changes will get overwritten.


#5

This had been reported to the strophe-plugins maintainor and new
version will be pushed at some point.
You can easily fix that with applying the following change in package.json:
- "strophejs-plugins": "^0.0.6",
+ "strophejs-plugins":
"git+https://github.com/strophe/strophejs-plugins.git",
As this bug is fixed upstream.

The second one was not needed for me to switch to not minimized version.

Regards
damencho

···

On Wed, Jan 13, 2016 at 6:06 PM, Jesse <bickelj@gmail.com> wrote:

1) Remove some problematic characters from strophe-plugins
https://github.com/strophe/strophejs-plugins/pull/88