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.");
  }
})();


And the second one will ask you for a query to search:

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;
  }
})();


But since it’s very useful to have this bookmarklet inside the share sheet of iOS/ipadOS and macOS, I made also a simple shortcut that can be launched via iOS share sheet or right click in macOS:

msn-spam

Screenshot 2023-09-11 at 17.35.08

Get it : https://www.icloud.com/shortcuts/5dacb37a13fb4771a5d0d9879e50a777

…and enjoy a msn.com free search =)

declutter_msn