Jump to content

Conflict Between 2 Scripts


Hooch

Recommended Posts

Howdy all. I have 2 scripts that are not happy with each other. From what I have googled there are functions that are named the same. So my limited knowledge of JS have brought me to the conclusion the 2 scripts have function( c ) and function(e) in common.There are 4 function's in this code at the beginning. But do I need to sift through all that code after these functions and replace all the c's and e's?I'm not even sure what I need to change amongst the 1st 4 functions since there are many c's and e's there too. Here is the first bit of code on the file (I can't post the whole code since IPBoard thinks I'm posting a bunch of emoticons)jquery-pack.js

eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('

There you can see the functions I am dealing with...after this code it's a bunch of gobbledee gook to me. Thank you for your time

Link to comment
Share on other sites

Do you have uncompressed versions of those files (this one is obviously packed by "packer").Are both scripts yours? If so, have you considered namespacing them (i.e. placing all functions of each script under an object named after the library)?

Link to comment
Share on other sites

do you have links to the two individual scripts? basically what is being suggested is to create a new variable so that instead of your scripts operating globally, and thus interfering with each other, you namespace them within the context of an object so that you can call function c for one script and not stomp over function c in the other script.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...