Problem with fancybox conflict through contentscript

1 view
Skip to first unread message

chunchulu govindarajulu

unread,
Feb 3, 2011, 12:27:56 AM2/3/11
to Chromium-extensions
Hi,

I am developed one chrome plugin for heighlighting the numbers in
the webpage. For this iam used the jquery.js and fancybox js files in
the contentscript(jquery.js,fancybox.pack.1.3.4.js).

When this plugin runs, the websites which having the fancybox will be
conflicted with the contentscript fancybox.js file and it creates
errors.

We are also checking before load the fancybox.js file in the
website(our website which is having fancybox) , wheather fancybox is
alredy there or not.

But at the time of checking it is showing fancybox is not there in
the website.

EX: if(typeof jQuery.fancybox === undefined){

// code to load our fancybox.
}

But at checking point it is showing 'undefined' only. I
am put the js file in the contentscript and these js files put some
divs also in the websites.

What actually the contentscript is doing i didnt
understand. In api doc they said the contentscript injects the js
files in the webpage. But here it is showing undefined.


What is the reason and the solution.

Please sugguest on this.

Thanks.
Reply all
Reply to author
Forward
0 new messages