Can I write into Google Chrome Url Address bar using an extention ? - google-chrome-extension

Can I create a Google chrome extension to change the URL of Google Chrome URL address bar?
Example : If I wrote in the address bar شةثقثىشغشزؤؤخة by wrong, it detects the letters and convert them into English letter to to : amerenaya.com

You can listen to changes in the URL's of the tab using the onUpdated event then you need to determine if there is a litteral keyboard translation and then reload the tab using the update method, unfortunately this will cause the page to reload, but it gets you partially to your solution.

Related

Chrome Extension for URL Bar pre-load

I am looking to develop a Google Chrome extension that affects the way chrome loads text typed into the URL bar.
Current functionality: if your text matches history / bookmarks it'll pull those up and auto-populate with the suggestion(s) and if you keep typing it'll update it's suggestions or remove them. If you type something that doesn't match any URL (like "test") it'll just do a search for the word(s) on google.com.
Goal: I want to be able to use the extension to listen to the text entered before it sends it to Chrome for loading the site / looking for a search term.
Example: if I type "test" and hit enter, I want the extension to listen to that first, tell Chrome what to do next (load a different site, search for a different word, etc.). Is that possible?
What API's (?) would I use for something like that? Any help would be greatly appreciated.

window.open with noopener opening URL in new window despite target=_self

I'm trying to open a window using noopener property and target=_self. Essentially what I want is to open the URL in the same tab while preventing it to have access back to the originating URL.
I'm trying with this syntax:
window.open('http://my-url.com', '_self', 'noopener');
However, this opens the new URL in a new window.
Is there some inherent functionality (maybe the browser back button?) which prevents a URL from opening in the same tab without having access to the previous window ? The docs say nothing about it (https://developer.mozilla.org/en-US/docs/Web/API/Window/open).
Thanks,
Chris
window.open explicitly opens a new window.
You can use location.assign to navigate to a new page in the current window. (Or just use a normal link.)
I guess you’re worried about “tabnabbing”, right? That only applies to windows opened from your page (e.g. using _target=blank or window.open).
Setting noopener has no effect on a normal link that doesn’t open a new window.
I think location.replace() is what you want
window.location.replace("http://my-url.com");
replace() removes the current URL from the document history.
With replace() it is not possible to use "back" to navigate back to the original document.

How to get gmail full screenshot

I'm trying to get full screenshot of HTML mail on Gmail.
Chrome extensions which like Screen Capture (by Google) does't work enough.
What should I do?
You'll not be able to take the complete screenshot of an email in Gmail default window. You need to take a different route to accomplish this i.e.
Click on the Print, it will open a new tab with Print dialogue.
Close/Cancel the Print dialogue (don't close the new tab).
Use Nimbus Screenshot or any other extension to take the screenshot of the HTML email.
Yes, Screen Capture by Google doesn't work for a long time. I recommend you Nimbus Screenshot. It is also a Chrome screenshot extension. And I just used it to get a full screenshot of HTML mail on Gmail. Hope it works for you.
I have tried everything with Nimbus but it simply wont work. Fragment Area takes the entire screenshot but only the visible part is saved rest image is blank.
Instead try clicking on the 'Print' icon on the upper right corner of your mail and save it as PDF.

URL formation in Chrome or Firefox or IE

I have seen this in one of the tutorial videos.
The tutor used firefox and typed in url box like google 'stackoverflow' and it formed the url as https://www.google.com/#q=stackoverflow. (This is just an example).
I think it will be a very useful feature.
Like, i have a ticketing system whose url is always like this - http://ticket-system.com/Tickets.aspx?Ticket=1000 where 1000 is the ticket number.
I want to be able to go to url box in browser and type 'Ticket 1000', and it should form the url by itself and redirect to there.
Any idea how this can be done?
I found my answer here
https://support.google.com/chrome/answer/95653?hl=en&ref_topic=14676
https://support.google.com/chrome/answer/95655
Start typing the web address of the site you want to search in the
address bar. If Google Chrome has a record of the site's search
engine, it automatically offers you the option to search that site. If
you remember the search engine's keyword, you can also type the
keyword in the address bar. Press Tab to choose the search engine,
type your search term, then press Enter.

Why is the address bar not editable?

Sometimes in websites when you click on some link a new browser windows appears where there's no back button and address bar is not editable,it's locked (greyed out) so you can't change the URL. Just a box containing some information or text boxes to enter data. I would like to know why. Is this because of some security issues or is there something else?
You are right - it has something to do with security, and in particular, preventing spoofing attempts.
The address bar is usually present in the popup windows of many browsers to indicate which page is being displayed. This way, the user is aware of their current location and will be able to tell if the popup is navigating to an illegitimate website.
The address bar is disabled as a cue to the user that they should not be navigating to a different page within the new window, but should continue their browsing experience by closing the popup and returning to the main window.
Please see this Mozilla ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=470051 - and especially Nochum Sossonko's comment for reference.

Resources