Skip to content

Instantly share code, notes, and snippets.

@b0oh
Last active August 29, 2015 14:01
Show Gist options
  • Select an option

  • Save b0oh/01354c52e2b66ccbf7a8 to your computer and use it in GitHub Desktop.

Select an option

Save b0oh/01354c52e2b66ccbf7a8 to your computer and use it in GitHub Desktop.
DuckDuckGo Explicit Userscript
// ==UserScript==
// @name DuckDuckGo Explicit
// @namespace https://gist.github.com/b0oh/01354c52e2b66ccbf7a8
// @include https://duckduckgo.com/*
// @version 1
// @grant none
// ==/UserScript==
$(document).ready(function () {
var results = $('.results');
var handler = function () {
results.unbind('DOMSubtreeModified');
results.find('.result__body').each(function () {
var result = $(this).find('a.result__url');
result.find('.result__url__domain').text(result.attr('href'));
result.find('.result__url__full').text('');
});
results.bind('DOMSubtreeModified', handler);
};
results.bind('DOMSubtreeModified', handler);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment