In-browser geolocation feature: how can I prompt the user to reenable after they've denied it? - browser

Similar to this question, but in my case I am the web developer. How can I get the browser to ask the user again if they want to allow geolocation? I was hoping I could put some text in the page, something like, "This page's features are only available when geolocation services are active, but you have denied them for this site. Click here to try again."
I know how to change the browser to accept this, but how do I help the visitors to the page from any browser to simply turn it on at the click of a button.

What you are looking for is Permissions API. Unfortunately at the moment it only allows to get the status of a permission, and mandatory requesting a permission for given API is not supported in any browser.

Related

Chrome extension popup closed after requesting permissions

I am calling this API from a Chrome extension I'm developing inside of a popup context:
chrome.permissions.request({
origins: [`https://google.com/`]
}, console.log)
However, whenever Chrome asks the user via their native alert to allow or deny permissions, my extension popup is closed after Google's alert dismisses, so I cannot finish the signup flow.
If the user has already provided permission for this domain, the user isn't prompted, I get console.log(true) and my popup window does not close.
What am I doing wrong, and if nothing, is there a workaround for this issue?
I made an issue in Chromium, and their team is aware of the issue, at least. Hopefully will see released at some point!
My temporary fix is just to make *://*/ a required permission instead of optional. Then I don't need to request permissions from the user at runtime. Which tells the user "this extension can access all websites", but at least the UX isn't terrible.

How do I capture the URL after an external website login in ReactJS?

I want to retrieve the URL after opening an external website pop up in my ReactJS/NodeJS application. Basically in my application, I have a button that redirects the page to microsoft online login page. What I want is the URL of the page after the user logs into microsoft online.
Is there any way that's possible? If so, what are my options?
If you navigate to another webpage, your React application is no longer being served to your browser, and can't do anything. You would need to have a script running on the microsoft website, either by writing it in the source code (which I doubt you can do) or by some other method such as a browser extension.
There is no way to track different systems like methods #izb mentioned, if they already dont provide.
Many systems provides information from their servers, push/ping systems.
One of the payment systems, I redirect request, customer pays, and they redirects the page I entered before in their panel, like successful or fail pages.

Suppress dialog caused by logging in via URL

I have a link on my web-page which automatically logs in through a generic username/password for the purposes of a demo, eg :
https://username:password#www.example.com
A dialog box shows up which says "You are now logging in as username. Is this correct?"
How can I remove this dialog to allow me to log into this web-page as cleanly as possible?
I've considered using JS to resolve the issue but there must be a simpler way?
Thanks
You are using http basic authentication which is a protocol that is a part of http. The username and password is sent to the web server and verified before your web page is loaded.
It is not the web page that creates this dialog, but your browser. It will be different for different browsers. Firefox creates a confirmation message when you provide the username and password in the address bar. Chrome will not create this confirmation message.
A javascript or any other kind of functionality in your web page would not be able to remove this message. The reason for this is that the message is created by the browser before the web page is actually loaded.

Facebook Like button that posts to page wall as well?

I have a online shop. On the home page there are products, with a like button. When a person clicks on the button, it goes to their profile and it says that they liked it. However, I also want when the user clicks like, that it is posted to my BUSINESS FACEBOOK PAGE as well.
1. Is this possible?
2. Is this possible using the standard facebook like button?
I am implementing this on a site with Drupal which is using the FBConnect module.
Yes
No
We can't do anything with that standard facebook like button. That's the way it is. However, we can achieve what you want by other means.
Since you're the owner of the business page, you can get the access_token for it, preferably with publish_stream permission. Then you can use edge.create event on the pages with the like button and detect that to publish on your business wall.
Check the links. For the access_token / authentication link, look for "Page Login".

Custom Terms of Use Page before login to SharePoint

I am using MOSS with ADS. I want to display Terms of Use page before the user can login into SharePoint with two button i.e. "Accept","Decline". If user select "Accept" he will be directed to sharepoint site, if not to our companies intranet front page. This will be applicable for the current session. ie. If the user has signed off, then it should prompt the terms of use again when user hits the MOSS site but once accepted user should not get this page again until he/she signs off.
Please advise.
Thank you
You can follow one of the Approach below based on your requirement & Flexibility.
If you have AD Configured with the FBA, Make a copy of Login.aspx and save it as MyLogin.aspx & Edit the Login Control and insert your Terms & Conditions there,keep in a check box AND enable the login button only if I agree is checked.
Next is to have a control that is deployed to the Master Page, this control will not have a UI but it will check in the session to see if the user has agreed the Terms and condition if yes it will redirect to the welcome page or the page user has requested else will navigate him to the Terms page until accepts.On Accept flag that information in session.
If you are using SharePoint 2010 you could use the Dialog framework to show a popup & get this done.
You could create a custom page in /_layouts which has your terms and conditions, along with the buttons for accept/decline.
Hitting the accept button will create a cookie for keeping track of whether or not the user has accepted the conditions for the current session.
Then, you could create a HttpModule which intercepts all requests to the SharePoint site. If the cookie is present, do nothing (ie let the user access the requested page), otherwise redirect the browser to the custom accept/decline page.
You should be able to do this fairly easily. If you dont care about them accepting or denying it, then just use this redirect module http://httpcode.s3.amazonaws.com/httpcode.Redirect.wsp to redirect them once to the page. You can tell this module to do it once. If you need to verify that they accept/decline, you will need to add all the people to a new group, and then on accepting, remove them from that group. That way they will always be directed to the new page.
Hope this helps

Resources