How can I get installed chrome extensions list with javascript - javascript

I have a web site made by Python Django.
And I want to check if a visitor's chrome browser's chrome extension is installed.
I found some information, it looks possible with Javascript.
https://www.python2.net/questions-993829.htm
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/management/getAll
They say you can get all installed chrome extensions by writing it like this.
chrome.management.getAll() or brower.management.getAll()
But When I tried that "chrome.management" is not defined.
Is it need to add library to use chrome.management?
I read the API documents, But I didn't know How can I to do.
Please teach me if you know about this. Thank you.

From the looks of chromes docs (https://developer.chrome.com/docs/extensions/reference/management/), it seems that chrome.management is only able to be used in chrome extensions with the management permission. There doesn't seem to be any real alternative for websites. (Although if you own the extension you might be able to create a hidden div with a specific id, then the website could detect that).
If chrome did allow websites to see this it would also make fingerprinting much easier.

Related

Node.js Automate Login and Upload

I currently have a node.js script that automatically creates a group of files and then zips them ready for being uploaded on a site. I'm trying to add one extra piece of functionality to the script that will log into the site and upload the file itself.
I've done some reading around and found a lot about headless browsers but not sure if that's the right path to go down as they seem to rely on other applications like chromium and they're focused on testing sites.
Does anyone know where I should start looking?
In my current project I am using the following library from Google, puppeteer. I personally found it to be very easy to use, and it even provides access to the dev protocol that Google Chrome has.
I've done some reading around and found a lot about headless browsers but not sure if that's the right path to go down as they seem to rely on other applications like chromium and they're focused on testing sites.
Yes, they are often used for testing, to assure that the correct things are rendered on screen etc. However, in many scenarios, like yours, the use of a headless browser to interact with a website is totally legit in a non-testing scenario.

How can I link to a chrome extension in Chrome Web Store when I'm not the developer?

I've seen the "How to link to chrome extension like Chrome Web Store?" question from Oct. 2011, and I tried to implement it.
However, I realized after some testing that the approach described in answer to that question regarding Inline Installation only works in situations where the original developer of the extension links to his own creation in the Chrome Web Store.
I have a daily podcast that I post to my website, and I want to provide a one-click link for Chrome users to click in order to install The RSS Aggregator extension (which I did NOT develop) directly, so that desktop visitors using Chrome can view my podcast feed in a formatted page rather than just seeing XML code.
Since I'm not the original creator of The RSS Aggregator extension, I don't see a way for me to accomplish this.
For the moment, I'm sending visitors to the Chrome Web Store to install it there, but I've been getting feedback from tech-averse visitors that they can't figure out how to install it without step-by-step installation instructions. Sadly, there are still a lot of people out there who have trouble handling something as simple as adding an extension to their Chrome browsers.
Hence my desire to provide a one-click solution on my site.
Is there a way I can implement a solution on my site?
Never used it before, but maybe this helps you:
https://developer.chrome.com/webstore/inline_installation#cws-link

Is there a way to run gremlin.js Monkey Tests on third party URLs?

Is it possible to run Gremlin tests on third party URLs or external websites? For e.g. If I want to run gremlin on Twitter.com, what would I have to do? I've not tried it yet, but I'm thinking a framework like nightwatch.js might be handy, but I'm not sure about how to go about it.
You can use it as a bookmark in your browser:
https://rawgit.com/marmelab/gremlins.js/master/bookmarklet.html
This will let you run it on any website.
I realized since posting this question that like #ste_irl has answered, using gremlin as a bookmarklet is the answer for most sites. But one big if here is that if the site implements a content security policy on script-src, the bookmarklet wouldn't work.
To get around this, this is what I did:
- Download Mozilla Developer Edition
- Set security.csp.enable to false
This still doesn't work on Facebook, but works on inbox.google.com and most other websites

Javascript command for Google Chrome download location

I was wondering if there is a command or something that gives access to Chrome's downloads location. I mean this frame on Settings.
From a webpage? Hell no. Lots of security and fingerprinting issues could arise from that very easily.
From an extension, doesn't look like it. Feel free to check through the docs yourself, but I didn't see it under any category I thought it might be under.

How to trigger the "yellow prompt" in Google Chrome or Chromium?

Sometimes while browsing websites using Chrome, you can see a yellow prompt showup. How can I trigger that prompt for my own websites?
For example try going to the The Independent's website and you will be prompted "The Independent now has a Google Chrome Extension. Get the latest news on the topics you like, direct to your browser."
I have previously seen this prompt on Google.com as well, however I assumed that that was something internal for google only websites. This is the first time I have seen the prompt for Non-Google owned websites.
It's a custom look-a-like they've made. Take a look at their javascript file here: http://www.independent.co.uk/independent.co.uk/editorial/javascript/tb.js
It does most of the work. You might be able to get some ideas from there :)
I assume you need to check this question: Chrome - Notify User to install your extension
Looks like there are no standard API for defining extension available for particular site – so you need to imitate such behavior with JS.
If I made a mistake, feel free to correct me in comments.
You are looking for the Infobars API, but this feature is only available for extensions.

Categories

Resources