How do I show a popup in my Crossrider browser plugin - crossrider

How can I show a popup programmatically in my Crossrider.com browser plugin? It works fine to click the button and show it, but I want it to show automatically on certain pages. I do not see any api method available like appAPI.browserAction.showPopup(), which would be ideal. I also do not see how to trigger the button click event. TIA.

First of all, I would recommend you to familiarizing yourself with How to add a browser button to your Crossrider extension in general and the button popup feature specifically.
Now, as for triggering the browser button "window open" right from the code - this is not supported through the API as it bad for user experience and in any case not supported in Chrome, so building such support only for Internet Explorer and Firefox seems futile.

Related

How to solve facebook login plugin configurator error?

I am using Facebook Login Pluginator(https://developers.facebook.com/docs/facebook-login/web/login-button#plugin-configurator). On click of that button it will open popup itself(As pop up is opening after click event so browser will not block popup).There is error message for developer like below.
"You are using a display type of 'popup' in a large browser window or tab. For a better user experience, show this dialog with our JavaScript SDK without specifying an explicit display type. The SDK will choose the best display type for each environment. Alternatively, set height and width on your window.open() call to properly size this dialog if you have special requirements precluding you from using the SDK. This message is only visible to developers of your application."
How can i fix that?
I am using v5.0 facebook js sdk.

How do I trigger the 'Add to homescreen' prompt for a PWA?

I have a PWA setup with a manifest and service worker such that I can manually add to the homescreen on Chrome in Android if I select the 'add to homescreen' button under the menu. I also verified on the Desktop that I can add it as a webapp in Chrome.
However, it seems that the installation banner only pops up based on some heuristics that Google selects e.g. user must interact with the site for 30 seconds etc.
What I would like is a button on my homepage, such that when I trigger it, the add to homescreen banner will automatically pop up in Chrome. How do I do this?
I want something similar to the 'Install' button on this example site: http://airhorner.com, which manually triggers the banner. However, what I would like is a minimal working example that demonstrates this.
The first thing to check is with the Chrome Audit tools.
Run the Progressive Web App audit
Under Passed Audits, you should see
--- "User can be prompted to Install the Web App"
Notes I have for A2HS
Source code links there for my working example
https://ng-chicago.github.io/2018/06/18/add-2-home-screen/
There are also reference articles I used
Most of the work when testing your A2HS is constantly clearing out your browser and previous installs (Chrome desktop and mobile) to test again.

Extension options menu?

When I right click on my browser button there is a grayed out "Options" option. When I click on this option for other extensions, a simple page is shown that allows you to change settings for the extension.
Is there any way to enable the Options menu for a CrossRider extension?
Currently, the Crossrider browser action button does not support the Options feature when right-clicking on the button. It's probably not a feature that can be supported cross browser, however, I have forwarded it to the product team as a suggestion for Chrome.
[Disclosure: I am a Crossrider employee]

How do I see what jQuery Mobile loaded in the background?

Using jQuery Mobile, I have seen how it adds to the existing DOM when links are clicked and a related page is served. Then, when ready, it switches to that new data-role="page". But when I do a "view source" in the browser (Google Chrome or Mozilla Firefox), I see the original page, as delivered, without the additional things loaded later (DOM injections). How can I see what the browser really has (post-render HTML)? If it happens to be a JavaScript solution, please don't presume I know where to put it and how to trigger it to show the content.
In Chrome: Wrench > Tools > Developer Tools would be a way to see the 'live' DOM.

How do I remove the undo popup with the Registration Social Plugin?

When using the Facebook Registration social plugin, the user is presented with an undo dialog after pressing the "Register" button. I've observed several sites that also use the Registration plugin that do not display this dialog, i.e. Car and Driver and Friend.ly.
Has anyone encountered this, and found the right box to check to disable the undo dialog behavior?
When looking at the returned files from Facebook, this parameter in registration.html seems to control this behavior:
FB.Registration.mustConfirm = false
I've tried the XML and older APIs, and have observed the same results. I'm looking for an official/supported solution to this problem, ideally, and not a JavaScript hack.
This feature is not currently available to all developers. We may make it available more broadly, but right now it is limited to a few partners.