Showing posts with label chrome. Show all posts
Showing posts with label chrome. Show all posts

Play the Dinosaur Game Hidden inside your Google Chrome

Google Chrome users are probably familiar with the T-Rex dinosaur that shows up when your computer is not connected to the Internet. The T-rex had short arms and therefore lot of things were out of its reach. Chrome, like that dinosaur, too is having trouble reaching the Internet.

What’s even more interesting is that the offline dinosaur in Chrome is also a game. Press the space bar to activate and your Chrome tab will quickly turn into a moderately addictive game. The T-Rex will run and your mission is to prevent it from bumping into the saguaros.



The game is written in JavaScript and you can find the complete source code in the Chromium repository. Thanks Codepo8 for the discovery.
And it’s not just about Chrome for desktop, the dinosaur game is available in Chrome for Android as well. Switch to airplane mode and give it a shot. The only difference is that instead of the space bar, you need to tap on the screen to jump / fly the dinosaur.

How to Mute Individual Browser Tabs in Chrome, Safari, and Firefox



Web pages can automatically play audio thanks to HTML5, even if you’ve set Flash and other browser plug-ins to click-to-play. Most modern web browsers include an audio indicator that will show you which tab is playing sound. Most modern browsers also let you mute individual tabs.

This feature was available behind a hidden flag in Chrome for a while, and is now stable. Apple’s Safari was the first web browser that actually enabled it by default, and Mozilla is working on adding it to Firefox.

Google Chrome

This feature is now part of the stable version of Chrome and doesn’t require enabling any hidden flags to use. Just locate a tab playing audio — you’ll see a speaker indicator to the left of the “x” on the tab itself. Right-click the tab and select “Mute Tab.”

The audio indicator will turn to a crossed-out speaker icon, informing you that the tab isn’t allowed to play audio. Right-click it again and select “Unmute Tab” to change your choice.
This feature is now part of the stable version of Chrome and doesn’t require enabling any hidden flags to use. Just locate a tab playing audio — you’ll see a speaker indicator to the left of the “x” on the tab itself. Right-click the tab and select “Mute Tab.”

The audio indicator will turn to a crossed-out speaker icon, informing you that the tab isn’t allowed to play audio. Right-click it again and select “Unmute Tab” to change your choice.
























Apple Safari

This is also possible in Safari — Safari was the first browser that made this feature available to all its users.

As in Chrome, you’ll see a speaker icon to the left of the “x” button on an individual browser tab when it’s playing audio. You can click the speaker icon to mute the tab, and click it again to unmute the tab. You can also right-click or Ctrl-click the tab and select “Mute Tab” to mute that individual tab.

Unlike in Chrome, there’s no way to preemptively mute a tab. This option is only available when a tab is already playing audio.











Mozilla Firefox


Firefox is on the verge of adding built-in audio indicators on its tabs and a way to mute them. According to the bug report, this feature should be part of Firefox 42. It’s part of the latest experimental “nightly” builds of Firefox, too.

It works similarly to Safari and Chrome. If a tab is playing audio, you’ll see an audio indicator to the left of the “x” button on the tab. You can click that little speaker icon to mute a tab or right-click the browser tab and select “Mute Tab.”

Like Chrome, Firefox also allows you to preemptively mute tabs before they start playing audio — just right-click a tab and select “Mute Tab.”

If you’re still using an old version of Firefox, you can do this by installing an extension like “Mute Tab.” However, this extension doesn’t work as well — it only works with HTML5 audio. Thankfully, it’s possible to prevent plug-ins from automatically playing by setting them to click-to-play in Firefox.





















Microsoft Edge 

Microsoft Edge does at least include audio indicators on its tabs. Unlike all other browsers, however, those audio indicators are located at the left side of each tab.

Edge doesn’t yet offer a built-in way to mute tabs, and it doesn’t support browser extensions. Browser extensions — or Microsoft itself — may one day bring this feature to Edge. For now, Edge is still stuck playing catch-up to the features offered by established browsers.












You can always mute your entire browser to prevent all web pages from playing audio until you change your mind — assuming you’re using Windows or Linux. On Windows, right-click the volume icon in your system tray, select “Open Volume Mixer” and use the mixer to mute the browser or at least lower its volume. On Linux, you’ll usually find this option in your desktop’s sound settings, too — it’s offered by PulseAudio. Mac OS X doesn’t offer this feature.


How to Display Alternate Content to AdBlock Users

Ad blocking software like AdBlock and Ghostery are installed on millions of computers and thus affecting the bottom line of web publishers who are dependent on online advertising networks like Google AdSense to pay their bills. It takes time and effort to maintain a website but if the visitors are blocking ads, the revenues are reduced. Ars Technica says this is equivalent to running a restaurant where people come and eat but without paying.
As a website publisher, you have a few options. You can detect Adblock on the visitor’s computer and hide your content if the ads are being blocked. That’s going too far but you may ask for donations (OK Cupid does this) or request social payments (Like or Tweet to view the whole page) from AdBlock users.
The other more practical option is that you display alternative content to people who are blocking ads. For instance, you may display a Facebook Like box or a Twitter widget in the place of ads, you may run in-house ads promoting articles from your own website (similar to Google DFP) or you may display any custom message (see example>>>)
to the visitor.




Before we get into the implementation details.  It contains regular AdSense ads but if you are using an Ad blocking software, a Facebook Like box will be displayed inside the vacant ad space.


It is relatively easy to build such a solution for your website. Open your web page that contains Google AdSense ads and copy-paste the following snippet before the closing
tag. The script looks for the first AdSense ad unit on your page and if it is found to be empty (because the ads are being blocked), an alternative HTML message is displayed in the available ad space.
You can put a Facebook Like box, a YouTube video, a Twitter widget, an image banner, a site search box or even plain text.


  1. <script>


  2. // Run after all the page elements have loaded

  3. window.onload = function(){


  4. // This will take care of asynchronous Google ads

  5. setTimeout(function() {


  6. // We are targeting the first banner ad of AdSense

  7. var ad = document.querySelector("ins.adsbygoogle");


  8. // If the ad contains no innerHTML, ad blockers are at work

  9. if (ad && ad.innerHTML.replace(/\s/g, "").length == 0) {


  10. // Since ad blocks hide ads using CSS too

  11. ad.style.cssText = 'display:block !important';


  12. // You can put any text, image or even IFRAME tags here

  13. ad.innerHTML = 'Your custom HTML messages goes here';


  14. }


  15. }, 2000); // The ad blocker check is performed 2 seconds after the page load

  16. };


  17. </script>



One more thing. The above snippet only detects blocking of AdSense ads and replaces them with alternate content. The process would would however not be very different for BuySellAds or other advertising networks.

Find How Many Visitors Are Not Seeing Ads on your Website

Find How Many Visitors Are Not Seeing Ads on your Website

Adblocking software like AdBlock Plus have become mainstream and now pose a significant threat to web businesses that are dependent on online advertisements. The problem is so severe that Google and Amazon are paying the writers of AdBlock Plus to whitelist their ads. This may be seen as some kind of extortion but with billions of dollars at stake, the advertising companies have chosen to take the more profitable route.
It is estimated that ~5% of website visitors are blocking ads (PDF report) and the situation could be far worse for websites that have a more tech-savvy audience. If you are curious to know how many people visiting your own site are blocking AdSense and other ads, here’s a little trick.

Track Adblock Users with Google Analytics

Open your website template and copy-paste the snippet below before the closingbody. This code will detect the presence of adblocking software on the visitor’s browser and, if found, an event gets logged into your Google Analytics account.

  1. <script>


  2. window.onload = function() {


  3. // Delay to allow the async Google Ads to load

  4. setTimeout(function() {


  5. // Get the first AdSense ad unit on the page

  6. var ad = document.querySelector("ins.adsbygoogle");


  7. // If the ads are not loaded, track the event

  8. if (ad && ad.innerHTML.replace(/\s/g, "").length == 0) {

  9.  

  10. if (typeof ga !== 'undefined') {

  11.  

  12. // Log an event in Universal Analytics

  13. // but without affecting overall bounce rate

  14. ga('send', 'event', 'Adblock', 'Yes', {'nonInteraction': 1});

  15.  

  16. } else if (typeof _gaq !== 'undefined') {

  17.  

  18. // Log a non-interactive event in old Google Analytics

  19. _gaq.push(['_trackEvent', 'Adblock', 'Yes', undefined, undefined, true]);

  20.  

  21. }

  22. }

  23. }, 2000); // Run ad block detection 2 seconds after page load

  24. };


  25. </script>


The snippet works for both Universal Analytics and the older version of Google Analytics tracker that used the _gaq object. As a web publisher, your only option is to serve alternate content to AdBlock users so the visitors at least see some content in place of the ads.
One big caveat though – it will fail if the ad blocking extension installed on the visitor’s computer has blocked Google Analytics as well. Some of the popular choices like μBlock, NoScript and Ghostery do block Google Analytics so the approach won’t work and you may have to build your own in-house solution – like downloading an image hosted on your own server and then counting the hits to that image through the Apache server logs.

Kategori

Kategori