Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8319873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:27:37+00:00 2026-06-08T22:27:37+00:00

I am trying to make a firefox extension that will list all the videos

  • 0

I am trying to make a firefox extension that will list all the videos on a page. I had already got it working as a normal js script (not as an extension) so I know the script works.

My problem is that the $.ajax inside my firefox extension doesn’t get called at all. If I look at the error console it shows a message like “unsafe use of Jquery”. I’ve tried searching Google and other sites but I couldn’t come up with a solution.

Here’s the code where the problem is:

    var listMainVid = function ()
{
    // Make a JSONP call. We are using JSONP instead of JSON because we have to make a cross-domain AJAX call
    $.ajax({
        url:        vidinfo_q_url + "?jsoncallback=?",      // Don't forget to put in the 'jsoncallback=' part
        dataType:   'jsonp',        // Make a JSONP request, have it received as text, and interpreted by jQuery as JSON: "jsonp text xml."
        data:       {
                        video_url:  '' + doc.document.location
                    },
        success:    function ( data, textStatus, jqXHR )    // Keep in mind that this is just the request sending success.
                    {
                        if ( data.status === 'SUCCESS' )
                        {
                            var vid_loc = data.url, img_url=data.image_url;
                            if( Object.prototype.toString.call( vid_loc ) === '[object Array]' )    // Check if it's an array
                                vid_loc = data.url[0];
                            if( Object.prototype.toString.call( img_url ) === '[object Array]' )    // Check if it's an array
                                img_url = data.image_url[0];
                            addVideoToVidDiv( data.id, vid_loc, img_url );
                        }
                        else    // Error
                        {
                            //alert ( " Error! Data=" + data.status );
                        }
                        afterMainVid();
                    },  
        error:      function( xhRequest, ErrorText, thrownError )       
                    {
                        Application.console.log( " Can't do because: " + ErrorText + ", " + thrownError );
                        afterMainVid();
                    }
    });
    afterMainVid();
}

Any help/pointers would be greatly appreciated.

OK, I finally figured it out on my own. This is to anyone else who might run into the same problem. Change the dataType: ‘jsonp’, TO dataType: ‘json’, And that’s it! I don’t know why but FF doesn’t seem to support ‘jsonp’ calls from inside extensions. One thing to note here is that inside FF extensions, you don’t need ‘jsonp’ anyway as the extensions are free to make cross-domain ajax calls. Hope this will help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T22:27:39+00:00Added an answer on June 8, 2026 at 10:27 pm

    OK, as SomeKittens requested, I am answering my own question (didn’t know I could do that).

    The solution to the problem is to change the dataType: ‘jsonp’, To dataType: ‘json’.

    I don’t know why but FF doesn’t seem to support ‘jsonp’ calls from inside extensions. One thing to note here is that inside FF extensions, you don’t need ‘jsonp’ anyway as the extensions are free to make cross-domain ajax calls. Hope this will help.

    I’ve also provided the answer in the question itself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to make a Firefox extension which will use a webservice. I
I am trying to make a firefox extension which looks at all the new
I am working on a Firefox extension, and in that extension I am trying
I'm working on a firefox extension and I am trying to make it add
I am trying to make a firefox extension, and this is my very simple
I'm trying to make a combo box that behaves somewhat like the Firefox 3
I'm currently trying to make a GreaseMonkey script that will allow a user to
I'm working on a Firefox extension and I'm trying to stringify a JSON object.
I'm trying to build an extension to Firefox to get a page from a
I am working on a Firefox extension, and I am trying to pass a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.