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 4626638
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:26:59+00:00 2026-05-22T03:26:59+00:00

I am getting this one error when I use the Mozilla validator: This is

  • 0

I am getting this one error when I use the Mozilla validator:

enter image description here

This is the JS file:

const STATE_START = Components.interfaces.nsIWebProgressListener.STATE_START;
const STATE_STOP = Components.interfaces.nsIWebProgressListener.STATE_STOP;

// Version changes:
// It used to get the lists from a PHP file, but that was putting too much of a strain on the servers
// now it uses xml files.
// Randomizes the servers to load balance
// Mozilla editor suggested no synchronous file gets, so changed it to asynchronous
// Added one more server to help with the updates (Ilovemafiaafire.net)
// Edited some redirect code that some idiots were spreading FUD about.

var xmlDoc = null;
var quickFilter_100_count_redirect_url='http://www.mafiaafire.com/help_us.php';
var countXmlUrl = 0;
//var xmlUrl = 'http://elxotica.com/xml-update/xml-list.php';
var xmlUrl = new Array(4);
xmlUrl[0] = 'http://mafiaafire.com/xml-update/mf_xml_list.xml';
xmlUrl[1] = 'http://ifucksexygirls.com/xml-update/mf_xml_list.xml';
xmlUrl[2] = 'http://ezee.se/xml-update/mf_xml_list.xml';
xmlUrl[3] = 'http://ilovemafiaafire.net/mf_xml_list.xml';
xmlUrl.sort(function() {return 0.5 - Math.random()}) 

var realXmlUrl = xmlUrl[countXmlUrl];
var notificationUrl = 'http://mafiaafire.com/xml-update/click_here_for_details.php';
var root_node = null;
var second_node = null;
var timervar = null;
var mafiaafireFilterUrl = '';
//Calling the interface for preferences
var prefManager = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);

var quickfilter_mafiaafire =
{
    // get the domain name from the current url
    get_domain_name:function()
    {
        var urlbar = window.content.location.href;
        domain_name_parts = urlbar.match(/:\/\/(.[^/]+)/)[1].split('.');
        if(domain_name_parts.length >= 3){
            domain_name_parts[0] = '';
        }
        var dn = domain_name_parts.join('.');
        if(dn.indexOf('.') == 0)
            return dn.substr(1);
        else
            return dn;
    },
    // send ajax request to server for loading the xml
    request_xml:function ()
    {
        //alert(countXmlUrl);
        http_request = false;
        http_request = new XMLHttpRequest();
        if (http_request.overrideMimeType) {
            http_request.overrideMimeType('text/xml');
        }
        if (!http_request)
        {
            return false;
        }
        http_request.onreadystatechange = this.response_xml;
        http_request.open('GET', realXmlUrl, true);
        http_request.send(null);
        xmlDoc = http_request.responseXML;
    },
    // receive the ajax response
    response_xml:function ()
    {
        if (http_request.readyState == 4)
        {
            if(http_request.status == 404 && countXmlUrl<=3)
            {
                countXmlUrl++;
                //alert(xmlUrl[countXmlUrl]);
                realXmlUrl = xmlUrl[countXmlUrl];
                quickfilter_mafiaafire.request_xml();
            }
            if (http_request.status == 200)
            {
                xmlDoc = http_request.responseXML;
            }
        }
    },
    filterUrl:function()
    {
        var urlBar = window.content.location.href;
        //check if url bar is blank or empty
        if (urlBar == 'about:blank' || urlBar == '' || urlBar.indexOf('http')<0)
            return false;
        //1. get domain
        processing_domain = this.get_domain_name();
        //alert(processing_domain);
        //Couldn't fetch the XML config, so returning gracefully
        if(xmlDoc == null)
            return false;
        try
        {
            root_node = '';
            // Parsing the xml
            root_node = xmlDoc.getElementsByTagName('filter');
            for(i=0;i<=root_node.length;i++)
            {
                second_node = '';
                second_node = root_node[i];
                if(second_node.getElementsByTagName('realdomain')[0].firstChild.nodeValue == processing_domain)
                {
                    this.notificationBox();
                    mafiaafireFilterUrl = '';
                    mafiaafireFilterUrl = second_node.getElementsByTagName('filterdomain')[0].firstChild.nodeValue;
                    timervar = setTimeout("quickfilter_mafiaafire.redirectToAnotherUrl()",1500);
                //window.content.location.href = second_node.getElementsByTagName('filterdomain')[0].firstChild.nodeValue;
                //this.redirectToAnotherUrl(this.filterUrl);
                //timervar = setInterval("quickfilter_mafiaafire.redirectToAnotherUrl(quickfilter_mafiaafire.filterUrl)",1000);

                }
            }
        }
        catch(e){
        //alert(e.toString());
        }
    },
    // This function is called for showing the notification
    notificationBox:function()
    {
        try{
            // Firefox default notification interface 
            var notificationBox = gBrowser.getNotificationBox();
            notificationBox.removeAllNotifications(false);
            notificationBox.appendNotification('You are being redirected', "", "chrome://quickfilter/content/filter.png", notificationBox.PRIORITY_INFO_HIGH, [{
                accessKey: '',
                label: ' click here for details',
                callback: function() {
                    // Showing the notification Bar
                    window.content.location.href = notificationUrl;
                }
            }]);
        }catch(e){}
    },
    redirectToAnotherUrl:function()
    {
        var  qucikFilterRedirectCount = '';
        //Read the value from preferrences
        qucikFilterRedirectCount = prefManager.getCharPref("extensions.quickfilter_redirect_count");
        //alert(qucikFilterRedirectCount);
        if(qucikFilterRedirectCount % 15 == 0)
        {
            // Disable for now, can comment this entire section but this is the easier fix incase  we decide to enable it later

            //window.content.location.href = quickFilter_100_count_redirect_url+"?d="+mafiaafireFilterUrl;
            window.content.location.href = mafiaafireFilterUrl;
        }
        else
        {

            window.content.location.href = mafiaafireFilterUrl;
        }
        qucikFilterRedirectCount = parseInt(qucikFilterRedirectCount)+1;
        prefManager.setCharPref("extensions.quickfilter_redirect_count",qucikFilterRedirectCount);
    }
}
var quickfilter_urlBarListener = {
    QueryInterface: function(aIID)
    {
        if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
            aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
            aIID.equals(Components.interfaces.nsISupports))
            return this;
        throw Components.results.NS_NOINTERFACE;
    },
    //Called when the location of the window being watched changes
    onLocationChange: function(aProgress, aRequest, aURI)
    {
        // This fires when the location bar changes; that is load event is confirmed
        // or when the user switches tabs. If you use myListener for more than one tab/window,
        // use aProgress.DOMWindow to obtain the tab/window which triggered the change.
        quickfilter_mafiaafire.filterUrl();
    },
    //Notification indicating the state has changed for one of the requests associated with aWebProgress.
    onStateChange: function(aProgress, aRequest, aFlag, aStatus)
    {
        if(aFlag & STATE_START)
        {
        // This fires when the load event is initiated
        }

        if(aFlag & STATE_STOP)
        {
    // This fires when the load finishes
    }
    },
    //Notification that the progress has changed for one of the requests associated with aWebProgress
    onProgressChange: function() {},
    //Notification that the status of a request has changed. The status message is intended to be displayed to the user.
    onStatusChange: function() {},
    //Notification called for security progress
    onSecurityChange: function() {},
    onLinkIconAvailable: function() {}
};

var quickfilter_extension = {
    init: function()
    {
        //Initiating the progressListerner
        gBrowser.addProgressListener(quickfilter_urlBarListener, Components.interfaces.nsIWebProgress.NOTIFY_STATE_DOCUMENT);
        //Load the block list xml form server
        quickfilter_mafiaafire.request_xml();
    },

    uninit: function()
    {
        // Remove the progressListerner
        gBrowser.removeProgressListener(quickfilter_urlBarListener);
    }

};




// window.addEventListener("load", function () { TheGreatTest1.onFirefoxLoad(); }, false);
// this function is Called on window Onload event
window.addEventListener("load", function(e) {
    quickfilter_extension.init();
}, false);
window.addEventListener("unload", function(e) {
    quickfilter_extension.uninit();
}, false);

Can you tell me how to squash that error please?

  • 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-05-22T03:27:00+00:00Added an answer on May 22, 2026 at 3:27 am

    It looks like the offending line is setTimeout("quickfilter_mafiaafire.redirectToAnotherUrl()",1500);

    The setTimeout function can take a string (which then essentially gets eval‘d) or a function (which gets called). Using a string is not recommended, for all the same reasons that using eval is not recommended. See https://developer.mozilla.org/en/DOM/window.setTimeout

    In this case, the simplest fix would be to change it to setTimeout(function() { quickfilter_mafiaafire.redirectToAnotherUrl(); },1500);

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

Sidebar

Related Questions

I am getting this error now that I hit version number 1.256.0: Error 4
I'm getting this error: Cannot use a DependencyObject that belongs to a different thread
I am getting this error when I use the Linq expression of var emp
Alright, I'm having trouble getting started on this one. I'm trying to use the
I'm getting this error message in my log file WARN hbase.HBaseConfiguration: instantiating HBaseConfiguration() is
I am getting this error when i use a string array java.lang.NullPointerException The code
I'm getting this error message trying to use PHP Mailer. Please let me know
I'm getting this error: The service class myclass does not comply to one or
Can any one tell me why I am getting this error ? [myClassName tableView:numberOfRowsInSection:]:
My question is very similar to this one: Getting an error in jQuery when

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.