I am Using WebView in my windows 8.1 store app in which every (Target=_Blank) type link force a link to open in system browser I want to open it in a webview it self to restrict the link go outside the application is there any way to complete the action?
Thanks.
You can easily inject JavaScript that changes the target of anchors.
Refer to this: http://social.msdn.microsoft.com/Forums/it-IT/37f760ff-c476-4602-b1c0-b7a62c484d6a/xaml-page-webview-control-injecting-javascript?forum=xmlandnetfx
And this: http://irisclasson.com/2012/10/12/how-to-invoke-javascript-functions-in-a-webview-in-windows-store-apps/
Related
I was trying to make a pc application that helps people more conveniently when they are using a browser(e.g Chrome, Firefox, Edge ...)
For example, the application shows the default browser and let user can choose another browser as default if they want to, and the app shows all windows that are currently opened; Overmore, when the user clicks a specific window then app will focus the window.
user can select default browser
user can see all windows categorized by browser type
So, my initial planning was using Election js; however, I've found that there is no way to control a browser from the Electron application since Node js cannot access the users' system(this thinking could be wrong since I have poor English😥)
After some research, I'm guessing C# can do that by using windows api. I've saw this post that saying by using DDE, we can get tabs urls.
But I'm wondering if C# can fully control a browser; for instance, create a new window, notice if music or video is playing in the tab, request to browser for getting favorites list.
If it cannot, how about requesting api to the browser from pc application?
You cannot fully control a browser. Internet Explorer was the only browser that had a documented and supported API to control, inspect and automate. Internet Explorer is dead so this is a dead end. The basic DDE control interface is also outdated.
Accessing favorites and the content of open tabs is limited because evil people would use such APIs to inject and spy. If you want to access the favorites you will have to write custom code for each browser.
Using the accessibility and UI automation APIs is the only reliable and supported way of interacting with modern browsers. SetWinEventHook can be used to detect window creation and primitive state changes. MSAA/UI Automation needs to be used to get more information from each browser window.
The thumbnail API and/or magnifier API can be used to get the preview image.
To open a new tab, execute a new process with the URL on the command line. Some per-browser customization might be required (-new-tab parameter etc).
Use IApplicationAssociationRegistration::QueryCurrentDefault to detect the default browser.
I would like to know if it's technically possible to develop a WinForm or WPF C# application that can interact with any web browser tab.
Let's imagine I have a Chrome web page with a web form. I would like to run a WinForm app and be able to point and select a web form field to get the data in it. Exactly like the F12 feature of a browser when you can use the Select feature and use your mouse to select a DOM element.
As shown on attached screenshot.
F12 is a feature within the web browser, but how can I reproduce the same behaviour with an external custom WinForm/WPF application ?
Is it even possible?
I don't think there is a way to achieve what you want to do.
If there was, anyone could write a program to read all of the data you input into your browser, that would be a security nightmare.
yes, you can do it using Selenium.
Check this out: Selenium.
I have an application named MyApplication. What I am trying to do is to do deep linking.
I would like to associate a link that when click on my Windows Phone 8.1 XAML, the application will be launched with the elements passed.
For example: MyApplication://item/1234 -> will open my application.
I am trying to do this from outside of an application is this possible? for example if I clicked on this link that was in an email, could it be redirected to my application?
Edit:
Here is part of the solution but i am not finding what i really wanted to do:
Uri Activation(XAML)
https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh779670.aspx
Code:
https://code.msdn.microsoft.com/windowsapps/Association-Launching-535d2cec
You sure can. Create the protocol (something like test:) in your app and deploy it to your machine. Then, in Start>Run type "test:" and your app will load just fine. A link in email? Sure. A link in a web page? Sure. It all works.
A little more: http://blog.jerrynixon.com/2012/10/walkthrough-using-windows-8-custom.html
Best of luck!
How to create a bookmark button so that the user can have a bookmark of a web page???
My web browser control for my windows phone 7 application is "browsers". Thanks in advance for your hard work!!!
Just use a standard Button control that is able to retrieve the currently opened Url in the WebBrowser and either serialize the data to a custom model or simply store the string in the Isolated Storage.
You might want to take a look at Isolated Storage Overview for Windows Phone to get an idea how to store the links.
Say I have a mobile optimized website which runs with a lot of javascript on it to create awesome effects, and a user enters the website via a mobile browser which doesn't have javascript activated.
Is it then possible to (through a button click) redirect that user to his/hers browser settings?
You need to have JavaScript activated in order to browse this site properly.
Click here to change your settings
In principle, you can create an intent: URL that references an ACTION_SETTINGS Intent, though I have not tried this. Off the top of my head, the simplest way to construct that URL is to generate a scrap Android project and call:
Log.d("Something", new Intent(android.provider.Settings.ACTION_SETTINGS).toUri(Intent.URI_INTENT_SCHEME));
then check LogCat for the URL that you would put in the Web site. Of course, this URL will only work on Android devices.
I only know Windows Mobile (and there, only up to v6.1), but I would guess your clients would have to have some app of yours prior installed to access features of the device itself.
If websites could access a device's features, it would be viewed as a virus.