Chrome extension that turns on/off mobile profile - google-chrome-extension

Is there an extension that will allow me to turn the profile of a running Chrome window from desktop to mobile? This is, so that it automatically renders pages in mobile layout then I switch the profile on, and back to desktop profile when I switch it off.
Any ideas?

Take a look at this extension it allows to switch the user-agent: https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg
Regards

Related

For a Chrome extension, can it control other extensions like turning them off?

I'm working on a project where I need to see the page I'm working on without any extension injected code messing up what I see. I want to know if I can create, or if there is currently, an extension that disables all other extensions for xyz page.
No, extensions can only disable other extensions entirely by using chrome.management.setEnabled API. It's like the on/off switch in chrome://extensions page.
The only way to exclude a certain site from being affected by all or some extensions is to add ExtensionSettings policy with runtime_blocked_hosts that contains that site. Note that the entire site is disabled, not just a single URL. Example: {"*": {"runtime_blocked_hosts": ["*://lastpass.com"]}}
A simple workaround for your use case may be to open that page in an incognito window or even in a new browser profile without extensions: click your avatar icon in the toolbar to access the profile tools where you can create and then open a new profile.

Lightbox Enable in Chrome App/Extension

I have created my first Chrome extension/app and found out that lightboxes do not function inside the app. I created the app from the Google example kiosk app. I'm only using webview in the app and have no other customizations. It just points to a link.
I want to use the app as an auto-launch Kiosk app on a Chromebox. Via this website I found that 'alert' and 'confirm' are a disabled web feature on chrome web apps.
I am wondering if it is possible to enable alert and confirm in the Chrome app so that lightboxes will work when interacting with a website.
Thanks in advance.
Yes you can definitely call alert box inside a chrome extension, just like you would in a normal javasript file as stated in this thread.
chrome.browserAction.onClicked.addListener(
alert("Im an alert box triggered by Chrome Extension")
);
The link you provided suggests that you can create a custom popup/lightbox as a workaround. There's a complete tutorial here.
Happy coding! :)

Extension - Chrome native window

it is possible to add/open Google Chrome native panel or window (something like firebug or like chrome dev tool) from extension level or maybe it is possible to add new tab to dev tool ?
it is possible to add/open Google Chrome native panel or window (something like firebug or like chrome dev tool) from extension level
No.
or maybe it is possible to add new tab to dev tool ?
Yes. Declare a devtools_page in your extension's manifest, and use the chrome.devtools.panels API to "add a new tab".

Google Chrome Extension for Transparent Tabs or Windows

Is it possible to create a browser extension that would allow page-controlled window opacity? Not so that various elements on the page are of a given opacity, but to allow one to see other windows (like the desktop) behind the browser page.
Thank you.
No, this is not possible in an extension. Such transparency would be handled at the window manager level, and would require platform-specific code. This means that either Chrome would have to add this feature and expose it as an extension API (currently no such feature exists), or you would have to write a plugin.

What is the URL option to display a Mobile XPage App with iPhone theme?

When I load an xpages mobile application into desktop safari it displays the app with the default theming for an Android device. What do you need to do to get it to use the default iPhone theming?
I thought you needed add something like &iPhone=1 to the end of the url, but that's not working.
Thank you.
To quote the Mobile Controls tutorial:
A browser platform query string parameter is available for developers
to force the browser to takes precedence over one another. Just add
'?platform=iphone' or '?platform=android' to the URL and this will
force the correct theme for XPages mobile pages that match against the
xsp.theme.mobile.pagePrefix property.
Another option is to enable the Develop menu (Edit - Preferences, then on Advanced tab tick Show Develop menu in menu bar. Then from the Develop menu you can change the user agent or set your own.
You could use the sample application for the Extension Library from openntf.org. Go to the "Mobile" tab where you can "extract" the urls to show as iPhone, Android and BlackBerry.
With just a few changes you can add a url as a parameter to this application to show your own mobile app in the same context ;-) I use that for demo purposes.
/John

Resources