Can you change text "XXX Wants to use your location" - javascript

When a website requests for permission to use the users location through html5, is there a way to change the message that pops down?
Ultimately, I would like to have a pop up dialog, that would tell them why we're asking for their location, and if they press yes, it automatically 'accepts' or creates permission to use their location, rather than them having to press 'okay' twice, effectively.
So, Can you change the browser text?
And, can you control the button in the browser dialog/popdown?

Related

I want to make a popup which does not allows user to close browser until popup closes

I want to make popup which freezes the browser until the popup is closed. But I am stuck at a point since on closing the browser, it is asking the user to stay or leave but when a user clicks on leave it shuts down. I instead want a that when a user clicks the leave option it either reload the site or do nothing, also on doing the same for second time Chrome is giving alert to prevent any additional dialogue which I want to disable or it should do nothing. Until the popup is closed. So at last users should not be able to close their browser from a closing button of browser or by going back or replacing the URL. It should freeze until the requirement of the popup is fulfilled. Thank you and please help.
You can't force the users to stay on your site as the browser doesn't allow this (think of a malicious site forcing you to stay there). Your approach is probably the best you can do. Show a dialog that says something like. "Please wait while exiting..." or similar.
If you want to hide the "Block additional dialogs from this page" thing you can create your own dialog. Just a div with position: fixed and display: none and then onBeforeUnload show it with display: block.
Here is more on that: Stackoverflow.com
In that case you can use bootstrap popup:
like this:
https://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_modal&stacked=h
and on the click event on close button you can add new alert or some other popup..
and closing this type of popup box cannot reflect other data..
It might helps you.!

How can I make a tool-tip to automatically appear for my chrome extension which uses pageaction?

I want to have a message displayed automatically, whenever my pageaction icon is displayed.
How can I make that to be displayed, I want to alert the user that " You can click this button to perform so on....".
If you want a popup appear programmatically, this cannot be done, it can only be initiated by a user click.
It would be nice if you could use infobars API, but it is still experimental.
Therefore, your only choice seems to be to inject a script into the page that would create some sort of overlay on the page roughly pointing to the page action area.
Note that you will need permission to access that page, as activeTab permission is not enabled until user clicks on your page action.

How facebook/twitter share buttons avoid being blocked by popup blockers?

When a user which is not logged in to Facebook or Twitter, clicks the like/tweet button, a popup comes up asking the user to log in. This popup is not blocked by popup blockers of any kind. in IE for example, it opens up but anyway IE state a warning to the user. The bottom line is that all buttons probably use the same method.
I have a button that people click on it and it should open a similar screen, but it always gets blocked.
The button (in JS) works pretty much like FB like button. It checks if the user is logged in. If he does, then send the "like" to the servers. If he does not, then the login popup appears (and gets blocked).
So, it is a initiated by a user although not fully direct outcome, since we need to check if he logged in or not.
What is best method to do that?
The Popup Is activated by a click using the like, tweet button and they actually show only 1 popup. If you want, you can try by using only a single popup based on click for your website and you will definitely be able to understand this.

Message box under the web site logo

Is there a way to create a message box under the web site logo icon in a html page, just like the pop up: "This website does not supply identity information; your connection to this website is not encrypted. " when the logo besides the page url is clicked at stackoverflow.
Thanks.
Not that I know of. Those are browser messages (specifically in Chrome).
I think you mean the little icon left of the name of the page. If so, you know it is displaying the title element of head element. So you can put anything in the title element, but it will show in the browsers header also.
No you can't and to be more specific : No you will NEVER EVER be able to do it.
The little arrow for example in chrome that is present in such messages and messages like "save password" are there for the user to be able to distinguish between the page and the browser telling something (To avoid the page faking a browser message that could lead to bad security consequences)

Looking to Mimic GMail page change detection behavior

I would like to have my web app be abple to pop open new windows like GMail does for chats and phone calls but I'd also like to be able to detect if they click on something in the nav that will take the main window to another URL and break the code running in the popups windows.
Ideally it would prompt them and give them a chance to cancel the page change and not break the app. Any ideas how GMail does this?
You want to use the onbeforeunload event. The string you return will be displayed to the user in a dialog, giving the user the option of canceling the page navigation.

Categories

Resources