├── 2024-06-04_07-47.png ├── LICENSE ├── README.md ├── SecondPage.code-workspace ├── blocked_domains.txt ├── content.js ├── manifest.json ├── poo128.png ├── poo32.png ├── popup.html └── popup.js /2024-06-04_07-47.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hp27596/secondpage/7a32f523f918d9a48359f3c39dd310cdd4a7c9a7/2024-06-04_07-47.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Peter 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## SecondPage - Google Searches without media conglomerates 2 | 3 | ![Project Demo](./2024-06-04_07-47.png) 4 | 5 | This extension blocks most of the top 1000 English sites getting Google's organic traffic. 6 | 7 | I impulsively created this extension with the help of Claude Opus in a day after reading this [article](https://housefresh.com/david-vs-digital-goliaths/), so HouseFresh, this is for you guys. 8 | 9 | The problem, as discovered in a very recent [Google algo leak](https://sparktoro.com/blog/an-anonymous-source-shared-thousands-of-leaked-google-search-api-documents-with-me-everyone-in-seo-should-see-them/), is that popular media brands rank very well on Google, even if their content is utter garbage. 10 | 11 | [This article](https://detailed.com/google-control/) details how 16 media companies with almost 600 sites are dominating the world's Google Search results. It gives me a very funny idea, which is, if I can't stop them from dominating top search results, I can just block them out of my sight. 12 | 13 | Usage: 14 | - [Install link is here](https://chromewebstore.google.com/detail/secondpage-google-searche/koaojhnbfmmjnagblonbfilccbagjpgm). The extension is enabled by default, but wait for it, there's a button to disable it if you want! 15 | - If you'd prefer to modify the list of blocked domains, clone this repository, edit the txt file, and then go to `chrome://extensions/` -> Load unpacked -> Choose the repo's folder 16 | 17 | 18 | There's also a full write up with more quotes on [my website here](https://thesolofoundernewsletter.com/p/secondpage?utm_source=referral&utm_medium=github_secondpage) if you're interested. 19 | 20 | I'm a developer-adjacent guy (Read: I know a bit of code and use AI tools to help me make small funny things), so this right here is probably all it is. There's not gonna be updates or anything. 21 | 22 | I hope to bring more awareness to this problem with Google, and this extension is my way of doing something about it. Maybe it will make the internet we're using just a little bit better. 23 | 24 | It is licensed with an MIT License, so do whatever your heart desires with it :\). 25 | 26 | [Buy me a coffee](https://www.buymeacoffee.com/peternguyen) 27 | 28 | Check out my [newsletter for solo founders](https://thesolofoundernewsletter.com/?utm_source=secondpage_github) if you're interested :\) 29 | -------------------------------------------------------------------------------- /SecondPage.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "." 5 | } 6 | ], 7 | "settings": {} 8 | } -------------------------------------------------------------------------------- /blocked_domains.txt: -------------------------------------------------------------------------------- 1 | fandom.com 2 | yahoo.com 3 | tripadvisor.com 4 | mapquest.com 5 | apple.com 6 | indeed.com 7 | nytimes.com 8 | yellowpages.com 9 | forbes.com 10 | usatoday.com 11 | businessinsider.com 12 | britannica.com 13 | researchgate.net 14 | wikihow.com 15 | webmd.com 16 | healthline.com 17 | alamy.com 18 | cnn.com 19 | foursquare.com 20 | usnews.com 21 | cbsnews.com 22 | sciencedirect.com 23 | theguardian.com 24 | microsoft.com 25 | washingtonpost.com 26 | medicalnewstoday.com 27 | bbb.org 28 | study.com 29 | screenrant.com 30 | nextdoor.com 31 | ziprecruiter.com 32 | clevelandclinic.org 33 | mayoclinic.org 34 | justanswer.com 35 | zoominfo.com 36 | cnet.com 37 | waze.com 38 | trip.com 39 | gamespot.com 40 | lowes.com 41 | adobe.com 42 | ign.com 43 | goodreads.com 44 | bbc.com 45 | realtor.com 46 | bestbuy.com 47 | latimes.com 48 | city-data.com 49 | verywellhealth.com 50 | dailymail.co.uk 51 | groupon.com 52 | salary.com 53 | redbubble.com 54 | manta.com 55 | genius.com 56 | npr.org 57 | nypost.com 58 | goodhousekeeping.com 59 | today.com 60 | go.com 61 | weebly.com 62 | merriam-webster.com 63 | nbcnews.com 64 | people.com 65 | superpages.com 66 | sportskeeda.com 67 | indiatimes.com 68 | investopedia.com 69 | barnesandnoble.com 70 | quizlet.com 71 | scribd.com 72 | collinsdictionary.com 73 | wikiwand.com 74 | time.com 75 | cnbc.com 76 | espn.com 77 | gamerant.com 78 | apnews.com 79 | jstor.org 80 | springer.com 81 | patch.com 82 | redfin.com 83 | houzz.com 84 | wiley.com 85 | bloomberg.com 86 | reuters.com 87 | www.nhs.uk 88 | dictionary.com 89 | nature.com 90 | restaurantguru.com 91 | pbs.org 92 | kayak.com 93 | independent.co.uk 94 | oup.com 95 | cosmopolitan.com 96 | buzzfeed.com 97 | si.com 98 | cbr.com 99 | dnb.com 100 | allrecipes.com 101 | dreamstime.com 102 | travelocity.com 103 | grubhub.com 104 | chegg.com 105 | tvguide.com 106 | hollywoodreporter.com 107 | variety.com 108 | byjus.com 109 | wiktionary.org 110 | poshmark.com 111 | temu.com 112 | trulia.com 113 | parade.com 114 | prnewswire.com 115 | opentable.com 116 | aol.com 117 | ubereats.com 118 | brainly.com 119 | apartments.com 120 | allevents.in 121 | thegamer.com 122 | digitaltrends.com 123 | hopkinsmedicine.org 124 | eventbrite.com 125 | newsweek.com 126 | timeout.com 127 | zippia.com 128 | collider.com 129 | medicinenet.com 130 | crunchbase.com 131 | foodnetwork.com 132 | geeksforgeeks.org 133 | ew.com 134 | macys.com 135 | wayfair.com 136 | wsj.com 137 | kroger.com 138 | makeuseof.com 139 | marriott.com 140 | loopnet.com 141 | legacy.com 142 | healthgrades.com 143 | thefreedictionary.com 144 | wired.com 145 | rocketreach.co 146 | wordreference.com 147 | bbc.co.uk 148 | restaurantji.com 149 | theverge.com 150 | rome2rio.com 151 | homes.com 152 | goodrx.com 153 | issuu.com 154 | tomsguide.com 155 | southernliving.com 156 | justia.com 157 | orbitz.com 158 | rollingstone.com 159 | thespruce.com 160 | eater.com 161 | ranker.com 162 | billboard.com 163 | aaa.com 164 | abebooks.com 165 | popsugar.com 166 | nerdwallet.com 167 | pcmag.com 168 | lifewire.com 169 | everydayhealth.com 170 | techradar.com 171 | last.fm 172 | menupix.com 173 | biomedcentral.com 174 | chron.com 175 | mountsinai.org 176 | yourdictionary.com 177 | the-sun.com 178 | simplyhired.com 179 | medscape.com 180 | foxnews.com 181 | roadtrippers.com 182 | huffpost.com 183 | aminoapps.com 184 | food.com 185 | casetext.com 186 | angi.com 187 | wattpad.com 188 | cbssports.com 189 | vulture.com 190 | gamesradar.com 191 | reverso.net 192 | health.com 193 | cvs.com 194 | birdeye.com 195 | fodors.com 196 | howstuffworks.com 197 | bringfido.com 198 | theknot.com 199 | consumerreports.org 200 | bandcamp.com 201 | kohls.com 202 | bhg.com 203 | seamless.com 204 | msn.com 205 | tandfonline.com 206 | toasttab.com 207 | thoughtco.com 208 | instacart.com 209 | hindustantimes.com 210 | sagepub.com 211 | polygon.com 212 | realsimple.com 213 | bleacherreport.com 214 | discogs.com 215 | aarp.org 216 | countryliving.com 217 | iheart.com 218 | menshealth.com 219 | europa.eu 220 | travelweekly.com 221 | bab.la 222 | rent.com 223 | thepioneerwoman.com 224 | singleplatform.com 225 | rd.com 226 | movieweb.com 227 | economictimes.com 228 | zmenu.com 229 | mdpi.com 230 | vrbo.com 231 | teacherspayteachers.com 232 | kidshealth.org 233 | tasteofhome.com 234 | menards.com 235 | womenshealthmag.com 236 | samsclub.com 237 | opencorporates.com 238 | answers.com 239 | postmates.com 240 | metacritic.com 241 | thekitchn.com 242 | deadline.com 243 | frontiersin.org 244 | rateyourmusic.com 245 | cbc.ca 246 | istockphoto.com 247 | themoviedb.org 248 | mashable.com 249 | foxsports.com 250 | nationalgeographic.com 251 | libretexts.org 252 | urbandictionary.com 253 | nymag.com 254 | dexerto.com 255 | travelandleisure.com 256 | kiddle.co 257 | cars.com 258 | moovitapp.com 259 | roku.com 260 | kbb.com 261 | buzzfile.com 262 | findlaw.com 263 | refinery29.com 264 | bizjournals.com 265 | metafilter.com 266 | findmeglutenfree.com 267 | wordhippo.com 268 | edmunds.com 269 | theconversation.com 270 | priceline.com 271 | alberta.ca 272 | niche.com 273 | eatingwell.com 274 | telegraph.co.uk 275 | marketwatch.com 276 | thespruceeats.com 277 | drugs.com 278 | psychologytoday.com 279 | semanticscholar.org 280 | cargurus.com 281 | commonsensemedia.org 282 | vogue.com 283 | flipkart.com 284 | foodandwine.com 285 | theathletic.com 286 | thesaurus.com 287 | caranddriver.com 288 | movoto.com 289 | delish.com 290 | carfax.com 291 | marthastewart.com 292 | as.com 293 | vox.com 294 | cylex.us.com 295 | cntraveler.com 296 | statista.com 297 | uptodate.com 298 | mlb.com 299 | lww.com 300 | mirror.co.uk 301 | bankrate.com 302 | history.com 303 | apartmentguide.com 304 | dickssportinggoods.com 305 | radiotimes.com 306 | eonline.com 307 | comicbook.com 308 | acehardware.com 309 | hgtv.com 310 | jiosaavn.com 311 | momondo.com 312 | samsung.com 313 | fortune.com 314 | glamour.com 315 | lemon8-app.com 316 | bustle.com 317 | bbcgoodfood.com 318 | autotrader.com 319 | hotelplanner.com 320 | heb.com 321 | state.mn.us 322 | usmagazine.com 323 | remax.com 324 | cmac.ws 325 | newyorker.com 326 | sportingnews.com 327 | vecteezy.com 328 | livestrong.com 329 | kaiserpermanente.org 330 | thriftbooks.com 331 | jdpower.com 332 | theatlantic.com 333 | chicagotribune.com 334 | digitalspy.com 335 | musixmatch.com 336 | compass.com 337 | byrdie.com 338 | tvinsider.com 339 | toppr.com 340 | livescience.com 341 | weather.com 342 | jamanetwork.com 343 | made-in-china.com 344 | nj.com 345 | express.co.uk 346 | justwatch.com 347 | fool.com 348 | pitchbook.com 349 | motortrend.com 350 | autoblog.com 351 | thrillist.com 352 | axios.com 353 | esquire.com 354 | loc8nearme.com 355 | hilton.com 356 | deezer.com 357 | boomplay.com 358 | lumenlearning.com 359 | army.mil 360 | zazzle.com 361 | softonic.com 362 | bartleby.com 363 | verizon.com 364 | allmusic.com 365 | who.int 366 | seattletimes.com 367 | sirved.com 368 | onlyinyourstate.com 369 | decider.com 370 | prevention.com 371 | jcpenney.com 372 | elle.com 373 | studocu.com 374 | mojim.com 375 | bonappetit.com 376 | marca.com 377 | offerup.com 378 | howtogeek.com 379 | newegg.com 380 | weddingwire.com 381 | distractify.com 382 | checkle.com 383 | autozone.com 384 | shein.com 385 | audible.com 386 | yardbarker.com 387 | canada.ca 388 | resetera.com 389 | ndtv.com 390 | seriouseats.com 391 | plex.tv 392 | timeanddate.com 393 | dignitymemorial.com 394 | familyhandyman.com 395 | cinemablend.com 396 | depositphotos.com 397 | sharecare.com 398 | indiamart.com 399 | smithsonianmag.com 400 | architecturaldigest.com 401 | slate.com 402 | ultimate-guitar.com 403 | wanderlog.com 404 | viator.com 405 | ft.com 406 | letras.com 407 | untappd.com 408 | pennmedicine.org 409 | harpersbazaar.com 410 | vice.com 411 | indianexpress.com 412 | pressbooks.pub 413 | npidb.org 414 | bobvila.com 415 | wondershare.com 416 | avvo.com 417 | allmenus.com 418 | tractorsupply.com 419 | babycenter.com 420 | verywellmind.com 421 | thebump.com 422 | ticketmaster.com 423 | apartmenttherapy.com 424 | eurogamer.net 425 | mumsnet.com 426 | bedbathandbeyond.com 427 | capitalone.com 428 | nhsinform.scot 429 | metro.co.uk 430 | alltrails.com 431 | thewrap.com 432 | pcgamer.com 433 | tastingtable.com 434 | bmj.com 435 | complex.com 436 | androidauthority.com 437 | hotwire.com 438 | news-medical.net 439 | zdnet.com 440 | signalhire.com 441 | aafp.org 442 | lovetoknow.com 443 | self.com 444 | giftly.com 445 | techtarget.com 446 | thesun.co.uk 447 | sfgate.com 448 | makemytrip.com 449 | vitals.com 450 | food52.com 451 | familysearch.org 452 | travelmath.com 453 | azcentral.com 454 | amazon.co.uk 455 | tripsavvy.com 456 | verywellfit.com 457 | pixabay.com 458 | etonline.com 459 | letterboxd.com 460 | arcgis.com 461 | ihg.com 462 | mlive.com 463 | hubpages.com 464 | justdial.com 465 | merckmanuals.com 466 | businesswire.com 467 | scmp.com 468 | purewow.com 469 | sandiegouniontribune.com 470 | t-mobile.com 471 | songfacts.com 472 | abc.net.au 473 | af.mil 474 | whattoexpect.com 475 | kwai.com 476 | oxfordlearnersdictionaries.com 477 | housebeautiful.com 478 | apa.org 479 | popularmechanics.com 480 | fineartamerica.com 481 | theculturetrip.com 482 | booked.net 483 | behance.net 484 | famousbirthdays.com 485 | epicurious.com 486 | point2homes.com 487 | ancestry.com 488 | spanishdict.com 489 | rentcafe.com 490 | gq.com 491 | garagejournal.com 492 | spiceworks.com 493 | chamberofcommerce.com 494 | vedantu.com 495 | hamiltonplace.com 496 | cedars-sinai.org 497 | talent.com 498 | scientificamerican.com 499 | xbox.com 500 | nasdaq.com 501 | unsplash.com 502 | shopify.com 503 | rogerebert.com 504 | lawinsider.com 505 | mercari.com 506 | tripadvisor.co.nz 507 | zumper.com 508 | hinative.com 509 | primevideo.com 510 | nbcsports.com 511 | omnicalculator.com 512 | fastcompany.com 513 | masterclass.com 514 | zocdoc.com 515 | looper.com 516 | allure.com 517 | lonelyplanet.com 518 | aljazeera.com 519 | proboards.com 520 | apartmentfinder.com 521 | testbook.com 522 | seatgeek.com 523 | ieee.org 524 | teepublic.com 525 | rei.com 526 | twitch.tv 527 | dillards.com 528 | lifehacker.com 529 | neoseeker.com 530 | officedepot.com 531 | momjunction.com 532 | bankofamerica.com 533 | michaels.com 534 | choicehotels.com 535 | rockethomes.com 536 | prezi.com 537 | mentalfloss.com 538 | nike.com 539 | playstation.com 540 | forrent.com 541 | bestplaces.net 542 | nydailynews.com 543 | libguides.com 544 | pcgamesn.com 545 | asos.com 546 | hm.com 547 | recipes.net 548 | acs.org 549 | dotesports.com 550 | instyle.com 551 | vg247.com 552 | dallasnews.com 553 | arstechnica.com 554 | vinmec.com 555 | alignable.com 556 | gotquestions.org 557 | almanac.com 558 | 247sports.com 559 | cvent.com 560 | biblestudytools.com 561 | att.com 562 | churchofjesuschrist.org 563 | sheknows.com 564 | mashed.com 565 | zendesk.com 566 | causeiq.com 567 | thisoldhouse.com 568 | bing.com 569 | ricksteves.com 570 | howtopronounce.com 571 | coldwellbankerhomes.com 572 | nme.com 573 | thepointsguy.com 574 | indiewire.com 575 | teenvogue.com 576 | yummly.com 577 | macrumors.com 578 | thecut.com 579 | propertyshark.com 580 | songmeanings.com 581 | cheatsheet.com 582 | denverpost.com 583 | wunderground.com 584 | fastercapital.com 585 | oed.com 586 | upi.com 587 | findhelp.org 588 | tutorialspoint.com 589 | thehill.com 590 | square.site 591 | getyarn.io 592 | hotelscombined.com 593 | game8.co 594 | lyst.com 595 | oracle.com 596 | cleveland.com 597 | inverse.com 598 | ibm.com 599 | vanityfair.com 600 | worldatlas.com 601 | fastpeoplesearch.com 602 | business.site 603 | theorg.com 604 | sears.com 605 | tomshardware.com 606 | mensjournal.com 607 | al.com 608 | streetdirectory.com 609 | homeadvisor.com 610 | smartasset.com 611 | fandango.com 612 | thestreet.com 613 | apartmenthomeliving.com 614 | slashgear.com 615 | inquirer.com 616 | truecar.com 617 | advanceautoparts.com 618 | denofgeek.com 619 | bandsintown.com 620 | datanyze.com 621 | thedailybeast.com 622 | safeway.com 623 | parents.com 624 | 1stdibs.com 625 | chordify.net 626 | intuit.com 627 | hbr.org 628 | wordnik.com 629 | frommers.com 630 | qvc.com 631 | freep.com 632 | ldoceonline.com 633 | famousfix.com 634 | picclick.com 635 | bloomingdales.com 636 | eatthis.com 637 | monster.com 638 | propublica.org 639 | maxpreps.com 640 | androidpolice.com 641 | chewy.com 642 | klarna.com 643 | hp.com 644 | biblegateway.com 645 | vividseats.com 646 | nationwidechildrens.org 647 | definitions.net 648 | ralphs.com 649 | tubitv.com 650 | patient.info 651 | vocal.media 652 | bhphotovideo.com 653 | ajc.com 654 | worldpopulationreview.com 655 | meijer.com 656 | letras.mus.br 657 | foxbusiness.com 658 | amazon.in 659 | simplyrecipes.com 660 | eventective.com 661 | yourtango.com 662 | atlasobscura.com 663 | thebalancemoney.com 664 | findagrave.com 665 | socratic.org 666 | expedia-aarp.com 667 | hypebeast.com 668 | comingsoon.net 669 | engadget.com 670 | emedicinehealth.com 671 | indiatoday.in 672 | spectrumlocalnews.com 673 | recepteds.shop 674 | wellandgood.com 675 | steemit.com 676 | webstaurantstore.com 677 | 123rf.com 678 | dbpedia.org 679 | liveabout.com 680 | nfl.com 681 | hulu.com 682 | wagwalking.com 683 | rxlist.com 684 | rockpapershotgun.com 685 | oreillyauto.com 686 | chase.com 687 | getyourguide.com 688 | newsbreak.com 689 | womansday.com 690 | ifunny.co 691 | hotelguides.com 692 | care.com 693 | navy.mil 694 | autoevolution.com 695 | plos.org 696 | hotpads.com 697 | twinkl.com 698 | petmd.com 699 | amazonaws.com 700 | abc7chicago.com 701 | akc.org 702 | bible.com 703 | whosampled.com 704 | ck12.org 705 | publix.com 706 | homesandgardens.com 707 | nba.com 708 | slashfilm.com 709 | vcahospitals.com 710 | snagajob.com 711 | beebom.com 712 | techcrunch.com 713 | bobistheoilguy.com 714 | yumpu.com 715 | startribune.com 716 | barrons.com 717 | pissedconsumer.com 718 | javatpoint.com 719 | ford.com 720 | americansongwriter.com 721 | mindbodygreen.com 722 | boredpanda.com 723 | pagesix.com 724 | hunker.com 725 | doximity.com 726 | jacksonville.com 727 | minitool.com 728 | sciencedaily.com 729 | thetravel.com 730 | flyertalk.com 731 | dell.com 732 | parkopedia.com 733 | thumbtack.com 734 | gamestop.com 735 | moviefone.com 736 | essentiallysports.com 737 | voanews.com 738 | boardgamegeek.com 739 | biblehub.com 740 | nolo.com 741 | tripod.com 742 | proquest.com 743 | vaia.com 744 | foxweather.com 745 | deseret.com 746 | coursera.org 747 | arxiv.org 748 | pdffiller.com 749 | singlecare.com 750 | nordstromrack.com 751 | uptodown.com 752 | powerthesaurus.org 753 | mercurynews.com 754 | dollartree.com 755 | ballotpedia.org 756 | livemint.com 757 | dummies.com 758 | usps.com 759 | coldwellbanker.com 760 | united.com 761 | com.be 762 | standard.co.uk 763 | dribbble.com 764 | thehindu.com 765 | zappos.com 766 | oregonlive.com 767 | guidestar.org 768 | mubi.com 769 | bjs.com 770 | ktla.com 771 | songkick.com 772 | pennlive.com 773 | oxfordreference.com 774 | physicsforums.com 775 | linguee.com 776 | sfchronicle.com 777 | crateandbarrel.com 778 | ea.com 779 | morningstar.com 780 | audacy.com 781 | tvline.com 782 | grainger.com 783 | sky.com 784 | capcut.com 785 | draxe.com 786 | whowhatwear.com 787 | rtings.com 788 | userbenchmark.com 789 | expertreviews.co.uk 790 | tasty.co 791 | techadvisor.com -------------------------------------------------------------------------------- /content.js: -------------------------------------------------------------------------------- 1 | async function fetchBlockedDomains() { 2 | try { 3 | const response = await fetch(chrome.runtime.getURL("blocked_domains.txt")); 4 | const text = await response.text(); 5 | return text.split("\n").map(domain => domain.trim()).filter(domain => domain !== ""); 6 | } catch (error) { 7 | console.error("Error fetching blocked domains:", error); 8 | return []; 9 | } 10 | } 11 | 12 | function isBlockedDomain(url, blockedDomains) { 13 | return blockedDomains.some(domain => url.hostname === domain || url.hostname.endsWith(`.${domain}`)); 14 | } 15 | 16 | function hideSearchResults(blockedDomains) { 17 | const searchResults = document.querySelectorAll(".g"); 18 | searchResults.forEach((result) => { 19 | const linkElement = result.querySelector("a"); 20 | if (linkElement && linkElement.href) { 21 | try { 22 | const url = new URL(linkElement.href); 23 | if (isBlockedDomain(url, blockedDomains)) { 24 | result.style.display = "none"; 25 | } 26 | } catch (error) { 27 | console.error("Invalid URL:", linkElement.href); 28 | } 29 | } 30 | }); 31 | } 32 | 33 | function showSearchResults() { 34 | const searchResults = document.querySelectorAll(".g"); 35 | searchResults.forEach((result) => { 36 | result.style.display = "block"; 37 | }); 38 | } 39 | 40 | function initializeBlocking() { 41 | chrome.storage.sync.get("isEnabled", (data) => { 42 | if (data.isEnabled !== false) { 43 | fetchBlockedDomains().then((blockedDomains) => { 44 | hideSearchResults(blockedDomains); 45 | 46 | const observer = new MutationObserver(() => { 47 | hideSearchResults(blockedDomains); 48 | }); 49 | observer.observe(document.body, { childList: true, subtree: true }); 50 | }); 51 | } 52 | }); 53 | } 54 | 55 | chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { 56 | if (message.action === "toggleBlocking") { 57 | if (message.isEnabled) { 58 | initializeBlocking(); 59 | } else { 60 | showSearchResults(); 61 | } 62 | } 63 | }); 64 | 65 | initializeBlocking(); -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 3, 3 | "name": "SecondPage - Google Searches without media conglomerates", 4 | "version": "1.7", 5 | "description": "SecondPage - Google Searches without media conglomerates", 6 | "icons": { 7 | "32": "poo32.png", 8 | "128": "poo128.png" 9 | }, 10 | "permissions": [ 11 | "storage" 12 | ], 13 | "host_permissions": [ 14 | "*://*.google.com/*" 15 | ], 16 | "web_accessible_resources": [ 17 | { 18 | "resources": ["blocked_domains.txt"], 19 | "matches": ["*://*.google.com/*"] 20 | } 21 | ], 22 | "content_scripts": [ 23 | { 24 | "matches": ["*://*.google.com/*"], 25 | "js": ["content.js"] 26 | } 27 | ], 28 | "action": { 29 | "default_popup": "popup.html" 30 | } 31 | } -------------------------------------------------------------------------------- /poo128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hp27596/secondpage/7a32f523f918d9a48359f3c39dd310cdd4a7c9a7/poo128.png -------------------------------------------------------------------------------- /poo32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hp27596/secondpage/7a32f523f918d9a48359f3c39dd310cdd4a7c9a7/poo32.png -------------------------------------------------------------------------------- /popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Domain Blocker 5 | 57 | 58 | 59 |

SecondPage

60 |

The internet is better off without media conglomerates littered all over Google searches

61 |
62 | Off 63 | 67 | On 68 |
69 |

Buy me a coffee

70 |

Check out my newsletter for solo founders

71 | 72 | 73 | -------------------------------------------------------------------------------- /popup.js: -------------------------------------------------------------------------------- 1 | document.addEventListener("DOMContentLoaded", () => { 2 | const toggleSwitch = document.getElementById("toggleSwitch"); 3 | const coffeeLink = document.getElementById("coffeeLinkClick"); 4 | const newsletterLink = document.getElementById("newsletterLinkClick"); 5 | 6 | // Set the default state to enabled 7 | chrome.storage.sync.get("isEnabled", (data) => { 8 | toggleSwitch.checked = data.isEnabled !== false; 9 | }); 10 | 11 | // Update the state when the switch is toggled 12 | toggleSwitch.addEventListener("change", (event) => { 13 | const isEnabled = event.target.checked; 14 | chrome.storage.sync.set({ isEnabled }, () => { 15 | chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => { 16 | if (tabs[0]) { 17 | chrome.tabs.sendMessage(tabs[0].id, { action: "toggleBlocking", isEnabled }); 18 | } 19 | }); 20 | }); 21 | }); 22 | 23 | // Open the coffee link in a new tab 24 | coffeeLink.addEventListener("click", () => { 25 | window.open("https://www.buymeacoffee.com/peternguyen", "_blank"); 26 | }); 27 | 28 | // Open the newsletter link in a new tab 29 | newsletterLink.addEventListener("click", () => { 30 | window.open("https://thesolofoundernewsletter.com/subscribe?utm_source=secondpage", "_blank"); 31 | }); 32 | }); --------------------------------------------------------------------------------