Firebase iMacros ?

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information:CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
hhnmthvn
Posts: 1
Joined: Thu Sep 27, 2018 3:50 pm

Firebase iMacros ?

Post by hhnmthvn » Thu Sep 27, 2018 3:53 pm

I tried to using firebase firestore inside Imacros js file but it keep stuck every time I call firebase object (Already import firebase.js, firebase-app.js and firebase-firestore.js) I'm using firefox 64 with imacros 8.9.7 Please help me. Thank guys.

First of all I would like to thank chivracq for reminding me that this is the first time I have used the forum with lots of omissions, and I use google tranlate on non-standard translations. I have an idea, that is using firebase to As a realtime database, firebase details can be found here:

Code: Select all

https://firebase.google.com/

Code: Select all

 I'm using firefox version 55.0.3
the computer I'm using runs the 64bit win7 operating system
The iMacros version I use is 8.9.7
My problem is that when running the firebase error is not defined although I loaded the library, below is my code:

Code: Select all

loadScriptFromURL('https://code.jquery.com/jquery-3.2.1.min.js');
$ = window.$;
JQuery = window.JQuery;
const firebaseScript = "https://www.gstatic.com/firebasejs/5.5.0/firebase.js";
const firebaseAppScript = "https://www.gstatic.com/firebasejs/5.5.0/firebase-app.js";
const firebaseFirestoreScript = "https://www.gstatic.com/firebasejs/5.5.0/firebase-firestore.js";

                      var config = {
                       apiKey: "AIzaSyBKaUPPFVUEsEeAr9cjLfzBG1O3NEe-g40",
                       authDomain: "hhnmthvn1.firebaseapp.com",
                       databaseURL: "https://hhnmthvn1.firebaseio.com",
                       projectId: "hhnmthvn1",
                       storageBucket: "hhnmthvn1.appspot.com",
                       messagingSenderId: "960287847798"
                         };
                       firebase.initializeApp(config); 
function loadScriptFromURL(url) {
    var request = Components.classes['@mozilla.org/xmlextras/xmlhttprequest;1'].createInstance(Components.interfaces.nsIXMLHttpRequest),
        async = false;
    request.open('GET', url, async);
    request.send();
    if (request.status !== 200) {
        var message = 'an error occurred while loading script at url: ' + url + ', status: ' + request.status;
        iimDisplay(message);
        return false;
    }
    eval(request.response);
    return true;
}
Last edited by hhnmthvn on Fri Sep 28, 2018 10:05 am, edited 2 times in total.
chivracq
Posts: 8523
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Firebase imarcos

Post by chivracq » Thu Sep 27, 2018 6:34 pm

hhnmthvn wrote:I tried to using firebase firestore inside Imacros js file but it keep stuck every time I call firebase object (Already import firebase.js, firebase-app.js and firebase-firestore.js) I'm using

Code: Select all

firefox 64 with imacros 8.9.7
Please help me. Thank guys.
Hum..., nice to see that you've "finally" discovered our Forum :wink: , 1 week after first opening your "How to use firebase firestore in imacros" Thread on SOF, still no Replies, oops...!, I might have answered it if you had put a Question Mark to your Title ("How to" + no Qt Mark means that you are sharing a 'How-to'...) and if you had posted a bit more Info/Details about your Scenario... :idea:

You'll first need to spell "iMacros" correctly here (especially in your Thread Title) to "motivate" me though to do any Digging/Research for you... :roll:

Then you'll need to mention your "real" FCI (read my Sig) or to confirm it (and to explain how you managed to install iMacros for FF v8.9.7 on FF64...!? :shock: ), as AFAIK, v8.9.7 only works until FF56... (You then need v10.0.2 ('Free'/'PE') to work on FF57+...) And you could mention your OS as well...

I don't know this "Firebase"/"Firestore", you could maybe give some bit of Explanation, with some Link maybe...

+ Post your Script and what you've tried...
+ "it keep stuck every time I call firebase object..." is a bit vague if you don't post your Script and don't give any Explanation about what "it keep stuck" means for you, with Runtime Errors etc... :idea:

>>>

Some mini-extra Detail:
I think you are the first "real" User on the Forum from your Country since 4 or 5 months that we see a stupid complete "plague" of Spam and Spammers originating from your Country, and we are obliged to block and ban more and more IP's and even complete IP-Ranges that are being used by Spammers..., and it could happen if you tried to check the Forum while being connected to Internet from some Cafe or some public IP that you wouldn't be able to access the Forum at all... (The IP you used to register your Account is/was OK and "clean" luckily... :D )
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
Post Reply