Chrome, JavaScript, webdev

Chrome 46 Updates

google-chrome-logo

Performance

Service Worker

Continue reading

Advertisement
Standard
Chrome

Google Search Updates

 Screenshot 2015-09-24 21.00.19

Helping hacked sites reconsider – A successful reconsideration is the last step a hacked website owner will need to go through to let Google know the site is now safe for users. You can see what is the progress in the way Google handle these requests here.

Mobile – As of September 1st, Google updated the Mobile-Friendly Test to indicate that sites should avoid showing app install interstitials that hide a significant amount of content on the transition from the search result page. The Mobile Usability report in Search Console will show webmasters the number of pages across their site that have this issue. If you have a site that is not connected to Search Console, I recommend you to connect it, it’s a great way to keep track on your site’s health and get important messages from Google.
For more read here. Continue reading

Standard
Chrome, mobile

Google Now On Chromebook

Screenshot 2015-04-24 14.50.35

“Google Now” got a powerful goal: The right information at the right time.
From knowing the weather before you go for a run, to planning the best route to avoid traffic, or even checking your favorite team’s score while they are playing, get the information you want, when you need it. You can look at it as a new phase in Search. You are getting the answers before you had the chance to ask the questions. If you use Android or iPhone – Good chances that you saw it in action. However, if you got a Chromebook, here is how you can manage it and sync between your phone and your laptop. Yesterday, Google has announced that they’re expanding Now with support for 70 new apps, including Spotify, Feedly, Runkeeper, OpenTable etc’.

How Google Now is working in Chrome? Continue reading

Standard
Chrome, HTML5, JavaScript, webdev

Chrome Extension For Enterprise Internal Usage

Chrome ExtensionsAt the beginning of the year, I’ve worked with a big organization that wanted to avoid the automatic suggestions Chrome is making in the omnibox (=the top field in Chrome, where you type searches and see the url).

Their main requirement was the need to allow employees to type a word and get the internal site that they are use to see. For example, the user will type ‘sale’ and Chrome will redirect them to the internal portal of sales. If you won’t modify Chrome it will run a google search on ‘sale’ and the results will be something like:

Screen Shot 2013-03-11 at 5.02.05 PM

The good news is that with this little extension you will be able to control the redirect of the users to the right internal location. Let’s jump into code.

This is the code of our manifest file that describe the extension


{
"name": "Omnibox customization example",
"description" : "To use, type 'get' plus a search term into the Omnibox.",
"version": "1.1",
"background": {
"scripts": ["background.js"]
},
"omnibox": { "keyword" : "get" },
"manifest_version": 2
}

view raw

manifest.json

hosted with ❤ by GitHub

Important to notice is that we setting the keyword ‘get’ in order to activate this extension. You can choose something shorter if you like. Another aspect is the “manifest_version”: 2 which making sure we are compatible with the latest spec.

This is the code of our background page


// each time the user updates the text in the omnibox this event
// is fired and we will use it to suggest search terms for
// our internal users.
chrome.omnibox.onInputChanged.addListener(
function(text, suggest) {
suggest([
{content: "CRM" , description: " fetch the internal CRM"},
{content: "ERP" , description: " fetch the internal ERP"},
{content: "sales", description: " fetch the lastest sales report"}
]);
});
// This event is fired with the user accepts the input in the omnibox.
chrome.omnibox.onInputEntered.addListener(
function(text) {
if (text.indexOf("/") < 1) {
text += "/";
}
if (text.indexOf("http") < 0) {
text = "http://our-internal-portal/&quot; + text;
}
alert('We are taking you to: "' + text + '"');
navigate(text);
});
function navigate(url) {
chrome.tabs.getSelected(null, function(tab) {
chrome.tabs.update(tab.id, {url: url});
});
}

view raw

background.js

hosted with ❤ by GitHub

Here we will listen to the events of omnibox.onInputChanged and omnibox.onInputEntered in order to execute our logic.

Another point you might want to consider is to go to:

chrome://settings/ -> Advanced ->  and then to disable these options:

  • Use a web service to help resolve navigation errors
  • Use a prediction service to help complete searches and URLs typed in the address bar
  • Predict network actions to improve page load performance

It doesn’t matter if you are working in a startup of few people or a big organization with 2.2M employees (e.g. Walmart). In both cases, you probably have internal network and  internal systems that your users will love to access with few keywords like: CRM, ERP, Sale, Marketing, QA etc’.

Happy coding & Happy Passover.

Standard