Cryptocurrency data based on Twitter trending chrome extension

I already built the basics but I’m having problems with connecting Twitter and Google Sheets API.

Does anyone have any documentation that I could follow through? I’m not really sure what codes to write in background.js and content scripts. I really need your help.

Thanks a lot!

Transfer execution to another javascript file from one javascript file

I am learning to use webAPIs in javascript by implementing a dictionary api. I want to get input in variable word from the popup of the chrome extension using the file popup.js.

Problem: I want to store this word and pass it to another file script.js which contains the API call to search for the definition of this word and return it back to the extension.js file to display it back in the popup. How to implement this?

What I looked up was to use global variables by calling the file containing the declaration of the global variables ie. first extension.js, somehow transfering its execution to script.js and then returning the result back to extension.js. How to transfer this execution? Or is there a cleaner way of doing this? Also, is there a better way than using global variables to pass info between two javascript files.

These are the codes, I have written so far-





var url = '' + word;
var request = new XMLHttpRequest();'GET', url, true);
request.setRequestHeader('accept', "application/json");

request.onload = function() {
    //Begin accessing JSON data here

    var data = JSON.parse(this.response);
    definition = data.results[0].senses[0].definition;
    definition = definition.charAt(0).toUpperCase() + definition.substr(1);



var word, definition;

document.addEventListener('DOMContentLoaded', function() {
    document.getElementById('status').textContent = "Extension loaded";
    var searchButton = document.getElementById('searchButton');

    searchButton.addEventListener('click', function() {

        var word = $('#textInput').val();
            $('#status').html("Please enter a word");

    addButton.addEventListener('click', function() {
        $('#status').html('The word is added to the list');

Anybody willing to give any advice would be very helpful. Any help is greatly appreciated!

Chrome extension API for web categorization

I have a Google Chrome extension that generates a popup with the following data:
date, time spent, url. I would like to know how to automatically categorize the url and place that in my popup. I can see that there are many free web categorization APIs online but I am not sure which would be appropriate for a Chrome extension. Please advise what API might be the best choice for this application.

Running separate timers for different opened web pages in javascript

I am making a chrome extension where I need to keep record of time spent on different web pages.
I want timer to stop if some webpage is closed after bit of usage and start timer again from it’s previously saved value if web page is reopened.

I am totally new to chrome extensions. Can anyone please guide a bit on this.


Restrict exposing certain request headers for REST API in browser

I am fetching a GET API using the fetch command in react. When I run the production build, I can see the x-api-key in request header when I inspect in either Google/Firefox (network). This is the API key that my web app uses to make the request and I don’t want it to get exposed in the browser’s devtools. Any ideas on how to achieve this?

How to add custom alert in Google Chrome Extension?

I’d like to be able to display a styled alert (for example, add image) which the alert dialog is called from the background script of a Chrome Extension (I want to write the code of alert in background.js). Is there any idea how I can display the alert? Is there an APIs Chrome Extension for that?
I have a simple alert without styled :

chrome.tabs.onUpdated.addListener(function (tabId, changeInfo, tab){
    if(changeInfo.status == 'complete' && tab.status == 'complete'){

 alert("This is a simple alert!");

  }   });

http ajax call inside Google Extension

I have a simple google extension that calls a Web API with HTTP Url

In the customscript.js file, I have the below ajax call

function Getresponse()
   return $.ajax({
       url: "http://url",
       crossDomain: true,
       async: false,
       success: callback

I have now two behaviors,

  1. When open HTTP page then click on the google extension icon, it is working properly and I get the response from the API without any issue.

  2. When open HTTPs page then clicks on the google extension icon, it’s not working by any means.

I traced the issue and made sure that this is because of the API URL is HTTP, not HTTPS

My question is How can call HTTP API in google extension whatever the current page is HTTP or HTTPS?

How to make common authentication between 2 server – Rails & Django

the service I’m developing consists of chrome extension & web application.
For it I’m trying to create 2 server:

  • web application server (build by Rails)
  • API server(build by Django) to receive requests from chrome extension and process user data.

Those application use same database, same user information.

My question is how to authenticate users — in Rails app, users can sign-up and sign-in via form. But in API server, how to authenticate users?

One solution might be JWT authentication, user get JWT token from Rails server and send token to Django server, and Django server authenticate by JWT authorization.

Is that best practice — or simply sending username & password is better then this?


Chrome Extension blocking twitter-widget local JS file

So i’m grabbing a tweet and having it sent to my extension which then uses that in a HTML popup. I seem to be having issue with the actual loading of the tweet design, I’m using has a local file since google chrome extensions don’t allow for inline scripting.

However, the widgets.js file its self makes a call which is blocked by google.

widget.js:1 Refused to load the script ‘‘ because it violates the following Content Security Policy directive: “script-src ‘self’ blob: filesystem: chrome-extension-resource:”.
Function.bind.test.window.__twttr.window.__twttr.widgets.window.__twttr.widgets.init.e.e @ widget.js:1
background.js:39 Uncaught (in promise) TypeError: Cannot read property ‘contentDocument’ of undefined
at background.js:39

So i’m not really sure on how to go about it, is there another method I can embed tweets? I basically followed this but instead of doing I just downloaded the file and did

Open source tool to Reconcile data

My data shared on multiple platform, i am looking for a tool to reconcile and compare that data find inconsistencies, Please suggest me.

Brief example
I have contract data of employee on one platform and basic details
but Employee HR data is on another platform with all his details, I need to compare that data on daily basis.