문제

I have written my first script for Greasemonkey, it is working great, except that it is returning exposedProps error in each page it is working on. I already fixed all other errors but this one is still there and based on some articles on web (like this) it will break my script in the future when Firefox 17 is published. (Right now I'm using Firefox 15.0 and fortunately it just returns a warning error!)

I'm using GM_xmlhttpRequest in my script:

function doProcess(id, in_process_type){

    var set_id = GM_getValue("pid"+id);

    GM_xmlhttpRequest({
        method: "POST",
        url: "https://website_address/return_params.php",
        data: "pid="+set_id,
        headers: {
            "Content-Type": "application/x-www-form-urlencoded"
        },
        onload: function(response) {
    --->    var params = response.responseText;
            params = params.replace(/(\r\n|\n|\r|\s)/gm,"");

            ..........
        }
    });
}

and this is error message that refers to the line that I put an arrowhead in front of it:

Error: Exposing chrome JS objects to content without __exposedProps__ is insecure and deprecated. See https://developer.mozilla.org/en/XPConnect_wrappers for more information.
Source File: file:///Users/Mona/Library/Application%20Support/Firefox/Profiles/tonfd656.default/gm_scripts/MonaTest/MonaTest.user.js
Line: 133 

I found this page, that offers a solution to this error, but honestly I can't figure out how I can use it here!

I really appreciate all your help in advance... And thanks for your time!

도움이 되었습니까?

해결책

This is a problem / potential-bug within Greasemonkey itself. See:

You might want to weigh-in and track those bug reports.

If you link to your complete script, we might be able to help with a workaround but, most likely, it can only be fixed within Greasemonkey itself.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top