Showing posts with label google. Show all posts
Showing posts with label google. Show all posts

Sunday, January 12, 2025

Bypassing Google "URL Swapping" in Firefox on Mac

Problem: Users on my wifi network can't click on ad links in Google Search results because those links redirect to the ad.doubleclick.net domain, which is blocked by my Pi-hole. The user ends up on a page with this error message:

Unable to connect. An error occurred during a connection to ad.doubleclick.net. 

Unable to connect. An error occurred during a connection to ad.doubleclick.net.

This happens on Firefox (as of the time of this post, January 2025) because Google is doing something a little bit sneaky: If you mouse over a hyperlink in a sponsored ad in a set of Google search results, it appears to be a normal hyperlink. However, as soon as you click on that link, Google swaps out the target of that link to be a different one than the one that was displayed -- and that's where the link ends up taking you.

(In more technical terms: Google appears to be using JavaScript's onClick event to cancel the navigation to the original href; then replaces the original href with the new href; and then proceeds to navigate to that new destination.)

For example, one of the results when I searched Google just now for "new wireless service" was https://www.verizon.com/plans/unlimited. However, clicking on that link actually navigated me to an URL starting with https://ad.doubleclick.net/searchads/link/click?lid=... . 

You can actually see the swapped-in hyperlink by using the browser's back button to return to the Google search results page, and mousing over the clicked hyperlink again. You'll see that preview of the destination URL for that same link has now changed! (The same happens if you right-click on the target link, then cancel the right-click context menu, and hover over the link again.)

My family members from time to time actually want to click on a sponsored Google search result, and have the navigation work properly. However, I don't want to whitelist the entire "ad.doubleclick.net" domain at my Pi-hole, since that would likely result in a lot more distracting ads being rendered as we use the web. 

I searched for a Firefox add-on which would prevent hyperlink URL destinations being changed from the preview URL that was shown prior to clicking on them, but couldn't find one that seemed trustworthy. 

(I do already run EFF's Privacy Badger add-on, which purports to include this particular functionality; but for whatever reason, it isn't working for me in Firefox as of the time of this post. Possibly Google has recently updated the mechanism that they use to perform their URL-swapping in Firefox; and Privacy Badger hasn't yet been correspondingly updated.)

Workaround / Solution

To my surprise, Google doesn't seem to perform their URL replacement when the search link is activated by the Return key, instead of by a click! Therefore, a crude-but-effective workaround is as follows, when looking at a page of Google search results:

  1. Hit the Tab key until the desired link has the focus. 
    • (Alternatively, double-click a word of text near the target link to select it; then press Tab and/or Shift-Tab from there until the desired link has the focus.)
  2. Press Return to activate the link.

This workaround does have the advantage of not needing any browser add-on to work!

When doing this, Google (apparently) doesn't have any JavaScript in place to hijack the link destination; the client browser navigates directly to the actual URL shown in the browser's preview, without being redirected through ad.doubleclick.net (or any other domain).

Wednesday, August 19, 2020

One Deck Dungeon Digital Scoresheet

One Deck Dungeon is a "Roguelike, dice-placement, single-player" board game. It's created and published by Asmadi games, and has a great digital adaptation for mobile devices and computers by Handelabra Games.  It's my current favorite "player vs environment" board game app on my iPhone.

The iPhone adaptation of One Deck Dungeon is particularly good! It plays in portrait mode, and does a great job of displaying the game, and allowing you to play it, that feels very natural on mobile. (This stands in contrast to many other mobile board game apps, which tend to have a single interface used for both the PC and mobile versions, with minimal adaptations to make the game more usable/playable on mobile devices.)


The mobile version of One Deck Dungeon unfortunately lacks one feature that its physical counterpart has: Tracking of which of the game's playable heroes have successfully completed which of the game's available dungeons. This feature of the physical game adds a lot of replayability, as you can work towards having a particular hero fully clear the game.

To address this, I've created a digital score sheet for One Deck Dungeon! Based on Google Sheets, it tracks which dungeons you've completed with which heroes, on which "challenge tier" (difficulty level), and displays your overall progress clearing the entire game with each hero.  Here's my current progress, as shown on the score sheet:

 
Now, before starting a new game of One Deck Dungeon on my phone, I'll open up this scoresheet on my phone's Google Sheets app, and choose a hero and dungeon that I haven't cleared yet (or want to improve my best completed difficulty tier on -- those are the values in the 1-4 range being filled in on the sheet). Then, I'll open up the actual One Deck Dungeon app, and start a new game with the selected hero and dungeon! If victorious, I'll come back to the sheet and fill in the appropriate cell.

Feel free to grab a blank copy of my One Deck Dungeon digital score sheet for yourself, and happy dungeoneering!
 
If you don't own a copy of One Deck Dungeon yet, I recommend it!


Monday, April 30, 2012

Workaround: Google Calendar: “Unable to reach Google Tasks” when trying to edit an event

While working with my Google Calendar just now, although I was able to view my calendar and create new events with no problem, when I tried to edit an existing event, I was getting an “Unable to reach Google Tasks” error displayed in the bottom-right corner, and the “edit event” page would not appear.

Logging out of my Google account and then back in again worked around this issue for me; editing events on my calendar works fine now for me after doing that.

Monday, July 07, 2008

How to search multiple domains with Google

It is possible to do a Google search and restrict the results to a single domain by using the Advanced Search form. You can also use the regular search form with syntax like:
search term(s) site:siteName.com
where siteName.com is the site you want to search. Google will show you search results from just that one site. For example: Search for "football" at umich.edu. As of the time of this writing, the Advanced Search form doesn't seem to support searching multiple specified domains instead of just a single one; adding a space between the domains entered on the "Search within a site or domain" field doesn't work (Google automatically removes any spaces before performing the search). Using one of the characters , ; : in the field as a delimiter doesn't work, either. However, you can do a multiple domain search by using syntax like this in the regular search form:
search term(s) site:siteName1.com OR site:siteName2.com
where siteName1.com and siteName2.com are the sites that you want to search. For example: Search for "football" at umich.edu and msu.edu.

Monday, October 08, 2007

Google Search indexer and Google Groups

About a month ago, I posted about my release of a new Windows Media Player skin. In that post, I noted that at the time of that posting, a standard Google web search for the term 'WMPImage_AlbumArtSmall' (a keyword used for adding album art to a Windows Media Player skin) had only a single result.

I just repeated that search, curious to see whether the Google search indexer had picked up my use of that keyword and added my post to the search results -- indeed it did. Interestingly, though, I noticed a 3rd result now present as well: A Google Groups page with more information on the WMPImage_AlbumArtSmall keyword that I had linked to from my original post.

Apparently, prior to that post, the Google search indexer hadn't indexed Google's own archived newsgroup thread; but when it indexed my blog post, it looks like the Google indexer followed the link to the Google Groups thread and indexed the thread at that point.

So it seems that (at least in this case) Google's search indexer doesn't crawl Google's own Groups discussion threads, but does index such threads when there is a link to the thread from elsewhere on the Web. I wonder why the Google indexer doesn't crawl those threads by default? Perhaps the quality of such discussion threads is presumed to be too low to merit inclusion in standard web search results as far as search results go; but if someone links to a thread's page, that thread's context is then assumed to be good enough to merit indexing? Or there might be a concern that Groups pages would appear too often in standard search results if all Groups pages were indexed by default -- and that's one reason that "Groups" is a separate search option from Google's main web search?

Monday, October 30, 2006

Workaround: Can't focus Google Toolbar with Alt+S in Firefox 2.0

In Firefox 2.0, a new top-level menu, "History," was introduced, with an accelerator keystroke of Alt+S. Unfortunately, this conflicts with the Alt+S keystroke used to access the Google Toolbar for Firefox. In Firefox 2.0, a press of Alt+S activates the History menu instead of setting the focus to the Google Toolbar.

A somewhat extreme, but effective, workaround for this is just to disable (remove) the History menu. This can be done by adding the following code to your userChrome.css file:

/* For now, hide the new Firefox 2.0 History
menu because Alt+S collides with Google toolbar 
search field */
menu[label="History"] {
   display: none !important;
}

Help on editing your userChrome.css file is available here: http://www.mozilla.org/support/firefox/edit

Google has indicated (in this Google Groups thread) that a better solution should be forthcoming. Hopefully it won't be too long! Until then, I can live with using the Ctrl+H History sidebar and the back button dropdown menu session history to duplicate most of the History menu's functionality.

Update 6/8/2007: The keyboard shortcut Alt+G now works in the latest version of the Google Toolbar for Firefox 2.0 to set the focus to the Google Toolbar's search field. This isn't quite as handy to reach with the left hand on a standard keyboard (compared to Alt+S), but it does bring the Google Toolbar for Firefox into step with the Toolbar for IE, which has always used the Alt+G shortcut to set the focus to the Search field.

(Alt+G wasn't used in older versions of the Google Toolbar for Firefox because it conflicted with the shortcut for the Firefox 1.x Go menu.)

Thursday, April 06, 2006

Bugs in Google Toolbar v2.0 beta for Firefox?

Earlier today, I installed the Google Toolbar v2.0 beta update for Firefox. I've noticed a couple of problems since installing it:

Alt+g

The Alt+g keyboard shortcut to focus the search field on the toolbar no longer works. I can see why this was missed during testing because for most Firefox users, Alt+g opens the Go menu. However, in my copy of Firefox, I have the Go menu disabled, which I did for the specific purpose of allowing Alt+g to work with the Google toolbar instead (as it does in the Internet Explorer version of the Google toolbar)!

I reported this issue to Google via their contact form for the Toolbar, so hopefully they'll fix it in a future update.

Update 4/7/2006 8:30pm: I got a response back from the Google team via email. They let me know that Alt+s works in Firefox to focus the search field. I hadn't previously been aware of this; it sounds good to me, since Alt+s is even easier to reach on the keyboard with my left hand than Alt+g! Now I'll just have to train myself to use it...

It is kind of unfortunate that the Firefox and IE versions of the Toolbar use different keyboard shortcuts; I wonder if IE could be made to use Alt+s as well for consistency.

Publishing Posts on Blogger

In my previous blog post that I made earlier today after installing the Toolbar update, the post wouldn't publish properly; when I clicked the Publish button, the browser just got stuck in a loop trying to publish the post; the post showed up in my list of posts in the Blogger "control panel", but it didn't actually show up in the blog itself.

I ended up opening up IE instead and publishing the post from there, and it worked with no problem.

I'm not sure yet whether the Google Toolbar update is somehow to blame for this problem. We'll see how publishing this post goes!

Update: Publishing this post from Firefox with the new Google Toolbar installed worked with no problem. Looks like maybe it was just a temporary issue with the Blogger site itself earlier today, as I haven't made any other changes on my machine since then.

Thursday, February 23, 2006

The true utility of Google Talk / Gmail integration

Google recently integrated Google Talk (their IM client) with Gmail (their email service). (More info on this is available in this Official Google Blog Post). Now, when you open a browser window with your Gmail inbox, a Google Talk widget with your "buddy list" appears in the window. You can also chat directly in the Gmail browser window in "popup panes" that appear in that window.

At first, I wasn't sure about the utility of this new feature. The thing that made Google itself take off at first a few years back, aside from the generally excellent quality of their search results, is the fact that the search page presented a really clean interface -- the Google logo, a text field, a "Search" button, and not much else. This integration of Google Talk into the Gmail window makes the Gmail interface seem rather more cluttered. I'm happy to just use the separate Google Talk desktop app.

However, the Google Talk / Gmail integration has enabled me to do something I've haven't been able to do before -- chat with my wife Missy at work!

Missy works at a large corporation where all individual workstations are heavily locked down security-wise. Users cannot install new software of any kind without IT intervention, and most ports on the external firewall are closed, so Missy has never been able to get any IM application to work on her work machine, including the Google Talk desktop app.

However, at least so far, the Google Talk client integrated into the Gmail browser window works just fine! It's in the browser window so there's nothing to copy onto the local machine, and whatever port the app is using to communicate is apparently not blocked.

So the Gmail-integrated Google Talk has at least allowed Missy and I to chat via IM during the day, which is pretty cool. Even though email and phone were both available to us before, IM just provides another way for us to stay in touch while we're apart, which is a good thing! :-)