How To Open a new Tab by passing some argument into URL - browser

If somebody click on link that should have some parameters in url to open the link in new tab.
for example : www.youtube.com/c/devtechsolutions
will just navigate to this link.
What if I would like to open this link in new tab, just by modifying the url with someparameters.
Only url has to be modified.

Related

href pdf file url is not found when click on it

I'm working on the vuejs application and, I'm receiving the pdf file from node backend which has the eg url https:abc.com/api/filename.pdf.
I'm using it link so
const myUrlVariable='https://someurl.com/dataCollection/imperial'
<a :href="myUrlVariable" target="_blank"></a>
The requirement of this is to when user click on link, file should open in the new tab.
But Right now when I click on the link its considering it as application route and show the message page not found, instead it show the pdf file.
I check this link in the postman and its returning the file as expected.
href should not be a string, but a binding to a variable
Change this
to this
<a :href="myUrlVariable" target="_blank"></a>
👆
Is the url correct?
https:abc... -> https://abc...

Not allowed to load local resource when opening chrome:// UI page from a chrome extension

I have a MV2 Chrome extension that on the popup page I added a "Shortcut" link so that user can access chrome://extensions/shortcuts by clicking it.
However, after upgrading to MV3, the link doesn't work.
Should I simply remove this feature?
You can resolve this issue by opening the page programmatically.
add some suitable selector to the link (popup html):
Configure Commands
add an event listener to open the shortcuts page (in popup script):
// get the DOM node
const link = document.getElementById("commands-link");
// add click event handler that opens the shortcuts page
link.addEventListener('click', () => chrome.tabs.create({
url: "chrome://extensions/configureCommands"
}));

How to set up editText to display search result in webView, when no URL is entered

I started this android webView project as my first android studio project awhile ago, I was slow with it and kept adding features little by little.
Now I want to develop the project into a web browser worthy of play store publication.
I have selected no action bar in my style, I am using an editText to load URL already but when a text is entered which is not an URL, it gives error.
So, I want to solve this by enabling search function when no URL is entered in edit text but regular text
i.e presently in editText google.com facebook.com or any URL loads but typing facebook, news etc in edit text shows error "WEB PAGE NOT AVAILABLE the web page https://google/ could not be loaded because net::ERR_NAME_NOT_RESOLVED"
I want to fix this, to enable google search or any other search engine in such case.
I do hope my question is understandable and well detailed?
Welcome in stack
to open URL with web View you must pass a full URL like https://stackoverflow.com and or stackoverflow.com
when you want to make query in some keys like Facebook or news
you can use google search as example with this key to get full link of this result
so when user input text you must check if this is url or not
So if is URL and will return true just pass it to web View
if not will return false,and pass it as query word to google and then show on web view
You can check if string is url or not by this code refer to this
bool isUrl= URLUtil.isValidUrl(text);
String url;
if(isUrl)
url = text;
else{
//this url well open in web view as google search
url = "https://www.google.com/search?q="+text.replace(" ", "%20");
}
//now you have url to open in your web view
i hope this help

Dynamic Link not opening web browser url

So when opening the dynamic link I get the error- Requested URL must be a parseable URI, but possibly incomplete to be a DynamicLink.
I have the app store link attached to it. How do I fix this?
Say my dynamic link is https://example.page.link and my URL is https://example.page.link/abcd.
DynamicLink dynamicLink = FirebaseDynamicLinks.getInstance().createDynamicLink()
.setLink(Uri.parse("https://exmaple.page.link/"))
.setDomainUriPrefix("https://example.page.link/")
.setAndroidParameters(new DynamicLink.AndroidParameters.Builder().build())
.buildDynamicLink();
dynamicLinkUri = dynamicLink.getUri();
But when I add abcd in setDomainUriPrefix() then the post in the app doesn't open, though the link opens in the browser.
DynamicLink dynamicLink = FirebaseDynamicLinks.getInstance().createDynamicLink()
.setLink(Uri.parse("https://exmaple.page.link/"))
.setDomainUriPrefix("https://example.page.link/abcd")
.setAndroidParameters(new DynamicLink.AndroidParameters.Builder().build())
.buildDynamicLink();
And when I receive this link, the url always shows as the playstore link, hence it doesn't open the app post. How can I fix this?
dynamicLinkUri = dynamicLink.getUri();

Navigate the default browser to a new URL in the same tab

My program can open a URL in the default browser. It opens the default browser if its not already opened and navigate the tab to sent URL. I am using following code:
opened = ShellExecuteA(0, "Open", URL, Chr(32), vbNormalFocus, 1)
The problem is that this always opens a new tab after opening first tab. Instead I would like it to refresh that first tab opened by my function.
I was wondering if it can be done by getting browser's tab ID and then sending new URL to that tab if it is already openend so no new tab gets open with this call.
Any help would be appreciated.

Resources