0

I have a huge JS library (three.js). (This library loads and displays a .jpg image as texture on the html5 canvas.) I'm looking for the object in the code that contains the loaded image data itself. I know that the loaded image data contains following text in the .jpg head section: "Adobe Photoshop CS4".

What should I do to find this object or the variable itself that contains this text?

Do you guys know a debugging program or plugin or something else that could find an object or a variable based on its value?

Do you have any idea?

Thanks in advence.

1 Answer 1

1

You can make a loop and check all the variables on the page. You have to search the window as a tree.

function search(x){
    try{
        for(i in x){
            if(x[i]=="Adobe Photoshop CS4"){
                alert("found");
            }else{
                search(x[i]);
            }
        }   
    }catch(e){}
    return;
}
search(window);

You need a good pc to run the code.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.