Is there some predicate or variable that one can use in the extension code to determine whether it was installed normally or in developer mode?
(I’d like to put some debug output visible only in developer mode.)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
No, there is no way to get this info directly.
But what you can do is the following:
Create a file with the name
debug.txt(or what you want) in your extensions folder.Make sure you always delete this file when creating the zipped .oex-file!
Now you can add the following code to your background script:
You will get a valid
[File]-Object if the file exists andnullotherwise.(Infos: http://dev.opera.com/articles/view/extensions-api-resourceloader/)