I added all_frames attribute to manifest but still no change in
behaviour. Tried with both false and true values.
{
"name": "ebay bug content script reload",
"author": "[email protected]",
"version": "0.1",
"description": "On eBay motors page content_script starts again
after few seconds.",
"content_scripts": [
{
"all_frames": false,
"matches": [
"http://cgi.ebay.com/ebaymotors/*_Cars_Trucks?
hash=item*"
],
"js": ["content_script.js"]
}
]
}
On Jan 19, 2:10 pm, Arne Roomann-Kurrik <[email protected]> wrote:
> Hi,
>
> It sounds like there might be iframes present in the page which cause
> your extension to run more than once. You can disable this behavior by
> setting the "all_frame" attribute to false in your manifest, as described
> here:http://code.google.com/chrome/extensions/trunk/content_scripts.html#r...
>
> Cheers,
> ~Arne
>
> On Sat, Jan 16, 2010 at 6:09 AM, tech4computer <[email protected]>wrote:
>
> > Hi,
>
> > On eBay-motors site on some of the vehicles ad the Extension will run
> > once and then after few seconds it will start again. Its not same as a
> > page reload/refresh. The original (first run) content-script variables
> > are maintained.
> > This doesn't happen with firefox extension with identical code.
>
> > Here's test script:
> > manifest.json :
> > {
> > "name": "ebay bug content script reload",
> > "author": "tech4computer",
> > "version": "0.1",
> > "description": "On eBay motors page content_script starts again
> > after few seconds.",
> > "content_scripts": [
> > {
> > "matches": [
> > "http://cgi.ebay.com/ebaymotors/*_Cars_Trucks?
> > hash=item*"
> > ],
> > "js": ["content_script.js"]
> > }
> > ]
> > }
>
> > content_script.js :
> > <start>
>
> > if ( !x ) var x=0;
> > x=x+1;
> > alert("x = "+x);
>
> > <end>
>
> > Test:
> > 1. load extension
> > 2. Goto ebay-motors car ad:
>
> >http://cgi.ebay.com/ebaymotors/DVD-NAVIGATION-POWER-DOORS-STOW-N-GO-N...
> > posting: 2005 Dodge Grand Caravan SXT
>
> > 3. You will get an alert message:
> > x = 1
> > after 5-10 seconds you will get
> > x = 2
>
> > 4. Reload/Refresh page
> > x = 1
>
> > The x = 2 indicates that the script is run two times. It happens on
> > some ads.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Chromium-extensions" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<chromium-extensions%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/chromium-extensions?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Chromium-extensions" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/chromium-extensions?hl=en.