Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught ReferenceError: artoo is not defined #253

Open
pradeepbn opened this issue Oct 7, 2016 · 2 comments
Open

Uncaught ReferenceError: artoo is not defined #253

pradeepbn opened this issue Oct 7, 2016 · 2 comments

Comments

@pradeepbn
Copy link

pradeepbn commented Oct 7, 2016

I am getting this error in popup.js at here:

artoo.on('ready', function() {
var tablink = "";
$('#get-data').click(function () {..}
});

I am using this in the chrome extension popup.js. Here is the manifest.json http://pastebin.com/B7w4M64g

Can you help me resolve this?

@Yomguithereal
Copy link
Member

With only this information @pradeepbn, I am afraid I cannot help you.

@pradeepbn
Copy link
Author

pradeepbn commented Oct 11, 2016

@Yomguithereal below are more details:

artoo.on('ready', function() {
      var tablink = "";
      $('#get-data').click(function () {
          chrome.tabs.getSelected(null,function(tab) {
                  tablink = tab.url;
          });
      var showData = $('#show-data');

      var nameList = artoo.scrape('.profile-overview-content h1', {
          name : 'text'
      });            
  });

This is in the popup.js which is equivalent to "content.js". I am assuming that artoo.scrape should work here because it works in the context of "artoo.on()". Is my assumption right? Below is the tree structure of my plugin directory:

├── css
│   ├── bootstrap.min.css
│   └── custom.css
├── fonts
│   ├── glyphicons-halflings-regular.eot
│   ├── glyphicons-halflings-regular.svg
│   ├── glyphicons-halflings-regular.ttf
│   └── glyphicons-halflings-regular.woff
├── jquery.min.js
├── js
│   ├── artoo.chrome.js
│   ├── artoo.min.js
│   ├── background.js
│   ├── bootstrap.min.js
│   ├── content.js
│   └── jquery-2.0.3.min.js
├── manifest.json
├── popup.html
└── popup.js

manifest.json is here http://pastebin.com/B7w4M64g

Thanks in advance. Please let me know if you need additional information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants