navigator.geolocation.getCurrentPosition not allowed on "file:///C:/" based access [duplicate] - html

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
HTML 5 Geo Location Prompt in Chrome
I've been looking at geolocation in Html 5. I'm using Chrome (12) and am accessing the html file using a path like this: file:///C:/_Development/Examples/Html5/boilerplate.html
I'm getting the little geolocation icon in the search bar that says that the location has been blocked from tracking your location.
Note that I don't have any exceptions setup at all...
Can this be done or do I need to host the file on a web server? If it can't be done, why can't it be done?
Thanks

This is a duplicate of this question:
HTML 5 Geo Location Prompt in Chrome
It seems that chrome has security restrictions on accessing geolocation data locally. You need to host the file to use the data. A workaround with python is available in the previous question.

Related

How to change user & browser settings on Chromebooks from same domain [duplicate]

This question already has answers here:
Is there any way to use a script to enable a single flag on Google Admin Console?
(1 answer)
Reset a Managed Chrome Device with SDK using Google Apps Script
(1 answer)
Admin SDK Chromeosdevices method
(3 answers)
Closed last month.
I manage a schools computers that the students are using. Since its kids that are using them I need to restrict them somehow.
We are using Chromebooks with our own Google domain.
Is it possible to create a list with blocked URLs in a google spreadsheet and then run a script that update the settings for every OU in our domain (or the ones that I choses) with our blocked URLs?
So far I havent found anything that is pointing me in the right direction

Which file does Chrome save cookies in? [duplicate]

This question already has answers here:
Where does Chrome store cookies?
(9 answers)
Closed 2 years ago.
I am trying to create a script for adding or removing cookies in Chrome before opening the browser.
I know that cookies are stored somewhere in the patch:
"C:\Users\user\AppData\Local\Google\Chrome\User Data"
but there are thousands of files inside User Data...
Does anyone know the name and direct path where cookies are stored?
I found the answer to my question:
C:\Users\your_username\AppData\Local\Google\Chrome\User Data\Default
You'll need a program like SQLite Database Browser to read it.
For Mac OS X, the file is located at :-
~/Library/Application Support/Google/Chrome/Default/Cookies

How Could My Chrome Profile Cause Chrome Extension Error: "Extension manifest must request permission to access this host." [duplicate]

This question already has an answer here:
Erratic behavior of executeScript: "Cannot access a chrome:// URL" on http://www.imdb.com/list
(1 answer)
Closed 4 years ago.
When I install the "Page Redder" sample Chrome extension (https://developer.chrome.com/extensions/samples) on my main profile it works for most sites, but not for Google Docs. If I try to use the extension to make Docs "redder" I get:
Unchecked runtime.lastError while running tabs.executeScript: Cannot access contents of url "chrome-devtools://devtools/bundled/devtools_app.html?remoteBase=https://chrome-devtools-frontend.appspot.com/serve_file/#1c32c539ce0065a41cb79da7bfcd2c71af1afe62/&dockSide=undocked". Extension manifest must request permission to access this host.
at chrome-extension://cianfokdkklhngjaknijlbfkpbgbgaib/background.js:9:15
Where background.js lines 8-10 are:
chrome.tabs.executeScript({
code: 'document.body.style.backgroundColor="red"'
});
However, if I do the exact same thing from a fresh profile it works just fine on Google Docs (it doesn't make the page red because of Doc's styles, but it doesn't cause an error). I thought maybe one of my other extensions was interfering with it so I disabled all of them (including the Google Docs ones) and yet still have the same problem.
So, my question is, what could I possibly have in my Google Chrome Profile that would cause such an error in the Chrome sample extension, even with all extensions disabled, but only on Google Docs. And if possible I'd like to know how I can "clean" my profile to eliminate it.
This morning I restarted Chrome and it fixed the problem entirely :( Sorry for such an unsatisfying answer.

Keep chrome extension id same during development [duplicate]

This question already has answers here:
Obtaining Chrome Extension ID for development
(3 answers)
Closed 7 years ago.
I am trying to test my chrome extension on different machines, and I saw that the extension id changes every time since I am loading it as an unpacked extension.
But, I really need to maintain the same extension id. My extension goes through OAuth 2.0 with an external non-Google provider. When I registered my extension with the external provider, I had provided the redirect URI in the form of
chrome-extension://<extension-id>/callback.html If I load the unpacked extension again, the id changes and my app no longer works as the redirect URI changes. It's practically unfeasible to keep changing the redirect URI. How do I maintain the same id?
You need to set the key in the manifest file, based on your generated pem file.
There's instruction on getting the pem here: https://developer.chrome.com/extensions/packaging
And there's more detail on the key field here: https://developer.chrome.com/extensions/manifest/key
Make sure you save your pem file once you generate it! It can never be generated again, and you'll have to republish your app to get a new one.

how to get alphanumeric extensions id for chrome [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Google Chrome - Alphanumeric hashes to identify extensions
I have written one chrome extension and I am packaging it using --pack-extension switch , it is giving me one .crx file and one .pem file. Now I wanted to install this extension on my deployment machine using windows registry, for that I wanted to know how do I get the extension id(which we get if drag and drop .crx file to chrome://extensions tab).
Extension Info of chrome.management API() fetches extension id. However onInstalled() event returns all Extension Info of extension installed.
Ex:
If extension id after packaging turns out to be kpddfdhkifopcepoldlgidejfnbhdbdn, it will be same where ever it is hosted.
Let me know if you need more information.