Declutter Duck Duck Go from msn.com

With two simple bookmarklets

Posted by Giulio Magnifico on Monday, September 11, 2023

Problem

Every time I perform a search in Duck Duck Go I get tons of spamming results from the terrible, I would say bloatware, website www.msn.com, that for some reasons has a better ranking in Duck Duck Go than the original news sources. And this thing was driving me crazy, also because on the terrible msn.com there isn’t a quick link to jump to the original website. It’s a total crap.

msn-spam

So I had to find a solution to fix this, one could be to use a stylesheet that eliminates msn.com but I didn’t want to install a browser extension only to exterminate msn.com, so I found another solution.

Solution

I made two bookmarklets and a shortcut to search in Duck Duck Go with the parameter -site:www.msn.com that eliminates all the crap.

Here are the two bookmarklets, the first uses your selected text as search input:

javascript:(function() {
  var selectedText = window.getSelection().toString().trim();
  if (selectedText !== "") {
    var searchQuery = encodeURIComponent(selectedText + " -site:www.msn.com");
    var ddgNewsURL = "https://duckduckgo.com/?q=" + searchQuery;
    window.location.href = ddgNewsURL;
  } else {
    alert("Please select some text on the page to use as the search term.");
  }
})();
javascript:(function() {
  var currentURL = window.location.href;
  var searchTerm = prompt("Search query:");
  if (searchTerm !== null && searchTerm !== "") {
    var modifiedSearchTerm = searchTerm + " -site:www.msn.com";
    var ddgURL = "https://duckduckgo.com/?q=" + encodeURIComponent(modifiedSearchTerm);
    window.location.href = ddgURL;
  }
})();

msn-spam

Screenshot 2023-09-11 at 17.35.08

Get it : iCloud link

…and enjoy a msn.com free search =)

declutter_msn