DonationCoder.com Forum

DonationCoder.com Software => Coding Snacks => Post New Requests Here => Topic started by: Bruce Fraser on September 03, 2018, 01:10 PM

Title: IDEA: block the "Solitaire" game in Google's search results
Post by: Bruce Fraser on September 03, 2018, 01:10 PM
The greatest productivity killer I know of is the Solitaire game which is built into Google Search.
I have looked for a way to stop me from playing it, to no avail. I suppose that means the greatest productivity killer is me. Call it whatever you want; I'm looking for help.
The obvious solution is to block Google Search altogether, and use Bing. But I'd rather not do that.
I use the excellent K9 Web Protection to block me from playing most games online.

I know zilch about programming, so don't know if what I'm requesting is even possible.
Thanks for considering it.
Title: Re: IDEA: block the "Solitaire" game in Google's search results
Post by: Curt on September 03, 2018, 04:26 PM
Your request is puzzling me; I didn't even know you can have games in Google Search! How did you get it in the first place? Yes, I can search for "Solitaire" and read that it has been included by Google since 2016. But I have never seen it, and I don't know where or how to get it. Maybe you need to adjust your Google Settings? Or install a simple advert blocker? They come free by the dozens, so I cannot think you would need any one here to write it for you.
Title: Re: IDEA: block the "Solitaire" game in Google's search results
Post by: KynloStephen66515 on September 03, 2018, 04:37 PM
Your request is puzzling me; I didn't even know you can have games in Google Search! How did you get it in the first place? Yes, I can search for "Solitaire" and read that it has been included by Google since 2016. But I have never seen it, and I don't know where or how to get it. Maybe you need to adjust your Google Settings? Or install a simple advert blocker? They come free by the dozens, so I cannot think you would need any one here to write it for you.


Yep...I'm with you on this...had no idea it existed until this thread.  I googled "Play solitaire on Google" and the game came up...that was the only way I could get it to show. 

Honestly...if it's that much of a time sink...the best idea would be to probably just not search for solitaire related search terms (I can't see that being an issue in most peoples daily lives).
Title: Re: IDEA: block the "Solitaire" game in Google's search results
Post by: wraith808 on September 03, 2018, 04:47 PM
You could add the urls to a block list from one of the many extensions that let you block time-wasting sites.

https://www.google.com/?ion=1&espv=2#q=solitaire&clb=clb

 https://www.google.com/?ion=1&espv=2#q=solitaire

But that won't block it totally, as you can just search for it.

It appears that the trigger is based on the following div:

<div class="mhPjTc">Click to Play</div>

You could block that div in your adblocker.
Title: Re: IDEA: block the "Solitaire" game in Google's search results
Post by: app103 on September 03, 2018, 06:27 PM
And don't forget to block this one, too: https://www.google.com/logos/fnbx/solitaire/standalone.html
Title: Re: IDEA: block the "Solitaire" game in Google's search results
Post by: Bruce Fraser on September 05, 2018, 07:36 AM
It appears that the trigger is based on the following div:

<div class="mhPjTc">Click to Play</div>

You could block that div in your adblocker.

Hi wraith808,
Thank-you; you were the first person with a helpful reply.
1) The URLs you give just go to empty pages, so that part wasn't helpful.
2) I don't use an adblocker. There are lots of them out there, each with its unique way of implementing their technique. Which do you recommend?
Thanks again for your help.
Title: Re: IDEA: block the "Solitaire" game in Google's search results
Post by: wraith808 on September 05, 2018, 11:10 AM
So maybe https://www.google.com/?q=solitaire + the one that app103 gave above.  Can't you block specific urls in the K9 Web Protection?  You can also block that div in ublock/ublock origin.  From trying it, it looks like you'll have to choose the element picker (the eyedropper) and mouse over the Click to Play, and click it.  Then click create.  Then you'll have to do the same for the image above, and then with the element left behind after that (the empty white square).  That's seems like enough.

UPDATE: I tested it with a refresh.  It appears to come back after refresh, even though the URLs are the same.  There must be some minor difference.  I'd suggest adding those two urls to your K9 and seeing if that is enough.