is it possible that a greasemonkey script can work on one computer but not on another?

Posted by plastic cloud on Stack Overflow See other posts from Stack Overflow or by plastic cloud
Published on 2011-01-15T21:13:50Z Indexed on 2011/01/16 9:53 UTC
Read the original article Hit count: 172

Filed under:
|

i'm writing an greasemonkey script for somebody else. he is a moderator and i am not. and the script will help him do some moderating things.

now the script works for me. as far as it can work for me.(as i am not a mod) but even those things that work for me are not working for him..

i checked his version of greasemonkey plugin and firefox and he is up to date. only thing that's really different is that i'm on a mac and he is pc, but i wouldn't think that would be any problem.

this is one of the functions that is not working for him. he does gets the first and third GM_log message. but not the second one ("got some(1) ..").

kmmh.trackNames = function(){
GM_log("starting to get names from the first "+kmmh.topAmount+" page(s) from leaderboard.");
kmmh.leaderboardlist = [];
for (var p=1; p<=(kmmh.topAmount); p++){
    var page = "http://www.somegamesite.com/leaderboard?page="+ p;  
    var boardHTML = "";
    dojo.xhrGet({
        url: page,
        sync: true,
        load: function(response){   
            boardHTML = response;
            GM_log("got some (1) => "+boardHTML.length);
        },
        handleAs: "text"
    });

    GM_log("got some (2) => "+boardHTML.length);

    //create dummy div and place leaderboard html in there
    var dummy = dojo.create('div', {    innerHTML: boardHTML    });
//search through it
    var searchN = dojo.query('.notcurrent', dummy).forEach(function(node,index){
        if(index >= 10){
            kmmh.leaderboardlist.push(node.textContent);    // add names to array
        }
    });
}
GM_log("all names from "+ kmmh.topAmount +" page(s) of leaderboard ==> "+ kmmh.leaderboardlist);

does anyone have any idea what could be causing this ??

EDIT: i know i had to write according to what he would see on his mod screen. so i asked him to copy paste source of pages and so on. and besides that, this part of the script is not depending on being a mod or not.

i got everything else working for him. just this function still doesn't on neither of his pc's.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about greasemonkey