Chrome extensions with text files [closed] - javascript

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am new to chrome extension and i need to develop a chrome extension which can handle text/json files (should be able to perform read-write operations).Files will be stored at the same machine(path may be D:/abc/xyz.text) where i will install chrome extension.Does any one have any idea?

That would sadly be not easy or downright impossible - a Chrome Extension cannot get read/write permissions for the real filesystem.
A Chrome App on the other hand can, using chrome.fileSystem API.
Your options:
Make a Chrome App instead. Might not be possible if you need browser integration.
Make an extension and a Chrome App that talk to each other, letting the Chrome App handle the file operations. Complicated install, but maximum flexibility.
Make an extension that uses a Native Host module to do operations with the filesystem. It will be even more complicated install, but UNLIMITED POWER.
Make an extension that works with its own virtual filesystem; if the user needs a file, you can use chrome.downloads API to export it.
Make an extension that works with some sort of cloud storage solution, e.g. with files in Dropbox.

Related

How to launch an application using a URL link from a web page? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
What link should be used and how to determine the right one for every OS?
iOS
Android
Windows
macOS
Linux
Is this universal for all operating systems?
<!-- Deep link URL for existing users with app already installed on their device -->
window.location = 'yourapp://app.com/?screen=xxxxx';
this is named Uniform Resource Identifier (aka URI).
The beginning of your URL "yourapp" would be a scheme. There are some schemes which are much used, for example ftp:, file:, mailto:, tel:, git:.
There are a lot of it but the support is very limited and as you said, depends on the browser and what software the client has installed on it. So, the scheme has nothing to do with the OS when you use a predefined scheme. If you want to have your own application you need to tell the OS "Uhm, hi there, could you please listen to that scheme" (As example in Windows with the Registry). And you can't do that from the browser because that would open a lot of possible attacks from the browser to your OS.
So to answer your questions: The right one for every OS? Is this universal? Yes, You need only one scheme, as it does not depend on the OS.
Think about it: What do you want to archive? A mailto:? Just do it. A ftp:? Well, your client has to have a FTP-Client with URI-Support. A custom app, like myapp:? That's a lot of work and I wish you good luck with that as it is a custom program for every OS.
If interested, see this link for a list of all schemes.
I hope, I could help you. Have a nice day :)

Malicious script injecting adware in my Wordpress instance [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Some malware is injecting this script somewhere in my wordpress main page. I already went through all files in Editor but I find nothing about this. Any idea where can I find it? Its driving me crazy.
This script is injecting adware popups in my wordpress website.
Try downloading the whole theme folder and plugins folder (with all plugins). Then you would need to run search across all those files. Usually malware code is using eval functions so you should search for eval across all those files. Searching one by one would take forever so use grep tool.
For windows I would recommend windows grep
http://www.wingrep.com/
For Mac I would recommend visualGrep app which is paid app and costs around 2 bucks but totally worth it.
If you have linux then you would need to find the software yourself or you can run such a search from the command line. (Actually you can use CLI on any system but I just prefer having app with GUI fur such task)
in 99% of cases (from my experience) you will find something like:
eval(base64_decode('dsalkndsalndsnldakslasdkn'));
That will be the malware code and you should take care of it (remove). If the code is in the plugin, then you should get rid of such a plugin probably.
Hope this helps.

How to get UUID specific to a PC in Chrome extension [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have my PC extension for google chrome, the extension is something like Sync ( Bookmarks, tabs etc). In order to associate each Bookmark and tab with the PC/Desktop/Machine on which it got created/modified. For which i may have to generate my own unique id along with ( for ex:- SerialNo_myown_unique, CPU_No_Myown_unique, MAC_addr_Myownuniqueno etc). So all i want to know is, how do i generate this using Javascript, as most of the blogs and articles i explored have not given clear instructions about how to do it?
Can someone help?
node-uuid will generate RFC compilant UUID strings for you. While these won't depend on the machine they are generated on I don't see why that should be necessary. You can generate a machine uuid once when your extension is installed and associate that with a user account on your service.
Alternatively you could just handle this on your server and request an id from the server after the user logs into his or her account after the extension has been installed.
In general, what you are looking for is called device fingerprinting and is a rather large issue for privacy. That is also why it's (thankfully) rather hard and imprecise to do. The Mozilla Wiki has an interesting collection on some techniques. You can test how unique your browser configuration is on Panopticlick.

Transferring Javascript Web App to Linux App [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Well, perhaps this is silly but I wonder is it possible, to transfer a web app built in Javascript with some html and css to linux platform?
I made a youtube player smth like youtube client, and I want to use on my Ubuntu 15.04 OS, as an app.
Here is a preview:
and I would love it if it would look smth like this:
I know that this Google Mail is just loaded from a web, but I want to make it accessible from my Ubuntu. Just instead of this google I ant that my app gets in. I hope you understand...
As has been pointed out, JavaScript and HTML5 don't "natively" run on Linux -- so you'll have to find an application to wrap yours. Plenty of these things exist -- Electron is very popular, as is nw.js.
Well, I'll try to take a stab at answering your question:
If you want to run it natively on linux without any other application being involved the answer to your question is not without rewriting it to some other language. Linux does not run javascript natively.
If you want something thinner then a web browser perhaps something exists to run your web app for you, but it's essentially going to be a light web browser. If you want to run javascript there will always be some other application between you and the kernel unless the kernel specifically supports javascript which Linux does not (and AFAIK no kernel does).
So in short, based on what I think you're asking for, no.

HTML :How to check whether the file is exist in local PC or not using javascript [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I am developing a Django web application in which I want to check if an application is installed or not on the client PC (the user's local machine).
A solution I came up with would be to check if a folder exists or not, for example the path C:\Program Files\TheApplication. Is it possible to check this from a Django application using any combination of Javascript, HTML and Django/Python?
Javascript cannot access the local file system. Evidently HTML5 provides a way for local storage but not full blown access.
I guess that using a signed Java Applet could achieve such functionality. As far as I remember if applet is signed, you have full access to the users OS.

Categories