With Node Js, Socket.Io bot making - javascript

How to run javascript with node js without opening google chrome from different proxies.
Can i get a sample code.
eg project: https://github.com/huytd/agar.io-clone
eg2project: https://drive.google.com/drive/folders/19v9lxRrRqrMp6n3k5rbDRljGVdLYELQc?usp=sharing
I don't want to use the project i link to
briefly: I'm trying to find a code that goes to Facebook.com/nick and clicks the send message button

puppeteer: puppeteer is no-gui-on-gui chromium browser. and nodejs

Related

VScode live share running on the same terminal

We are making a web app, and using Vscode live share feature, to edit on the same code. Altough we can edit the same code, my colleague cannot run the html code(chrome) in his own computer, for some reason we are on the same terminal(my mac), and when he runs it we see an error on my side too. How can we solve this issue on my end, to I have to give permissions? And how do we create a a different terminal for him using the base code.

How to run a React app as a Gmail Addon?

I'm trying to build a Gmail Addon using React. The problem is, we have to write Gmail Addons using google Apps Script. The reason I chose React is I already built a plugin for outlook using React. If I can use the same for Gmail then I can port the same plugin with minimal effort.
In short , we can't do that.
Gmail add-on UI is rendered from a google server. The code that we write rests on a server (unless you use clasp for local setup) and runs to render the UI. Also Gmail add-ons do not have access to the DOM.
You can not use react in gmail addon, as gmail addon script runs on google cloud engine and the resulting html that is generated by the cardservice is returned to the client. For everyaction in the add on, it will go to google app script engine and run the script and return the result.

Running a script command remotely using Python

I have a Python program that uses BeautifulSoup to extract some data from a website.
In Google Chrome, there is this option called the Developers Console; it is used to execute javascript commands live right on the webpage.
Is there a way, or a work-around-of-a-way to execute javascript commands remotely using Python? Like casting a webpage to an object and running a javascript command in the background (without launching a new Chrome window)?
You can use Native Messaging API to communicate between a shell script and the browser.
You can also launch Chrome or Chromium with --headless flag set. See also puppeteer.

Can I embed a chrome extension app as part of my main AngularJS app?

I have been doing a lot of reading and studying to figure out.
I basically just want my main AngularJS application to run, but also include an embedded Chrome Extension app - in this case, have regularly scheduled alarms (using the chrome.alarm API).
I want all users of my AngularJS app to have automatic access to the Chrome extension app, embedded in the main clientside one with lots of other Angular features.
It seems like I have to manually enable my Chrome app in Developer mode on my browser and even drag my Chrome app specifically to a location in my Chrome browser. I don't understand how end users can just automatically use my Chrome app then.
I need to add here I have never really used jQuery, only AngularJS but AngularJS extensively. My AngularJS app is the frontend, the backend is provided by Rails.
Some advice would be really helpful. I hope I am not downvoted as it is strange how sometimes questions get downvoted and I am not sure why...I don't really know where else to go with this question.
EDIT:
Ok some code to demonstrate:
myangularapp.controller('myappcontroller', function($scope, $http) {
var delayvar = 5;
chrome.alarms.create("arandomalarm", {delay: delayvar});
};
This doesn't just work as part of my AngularJS, I tried creating a manifest.json file in the app/assets folder too. As well as a background.js file there and my-chrome-app.js file. "chrome.alarms" is undefined, but I haven't enabled Developer mode yet. But still, how are end users supposed to use it if just to make me use it I need to do so much specific browser configuration?
You should have a look at Content Scripts and then at Message Passing which explains you how to communicate between a web page and an Chrome extension.
its not possible to automatically install a chrome extension. the user must install it from the chrome store.
you may make it easier for them to install it by providing an inline installation from your webpage. its in the official documentation and you can see an example on this page with the "add to chrome" button:
http://plusfortrello.com (one of my chrome extensions which has inline installation inside that page).
that example button is further customized to display a message instead if the user is not on chrome desktop.
if your extension also has permission to your webpage then you can also detect from your webpage if the extension is already install it (to hide the button, send messages to it and such).

Executing a Windows process from Windows 8 app using Javascript

I am working on a Windows 8 app where i want to execute a process with its parameters. Say "shutdown.exe"
I am working on the app in Javascript and HTML5. As far as i have researched it is not possible to do the same due to sandboxing (which i am not sure).
So is there a way to invoke a command process within a Windows 8 App ?
No. The closest thing is protocol activation, whereby an app can launch another via a URL. You can register an app to respond to any URI you want, but if someone else does the same, then your app won't run by default, and the user will be prompted to select which app they want to use to respond to the launch request.
You can check out how this works via the Application launching sample and the MSDN documentation.

Categories

Resources