Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save palfrey/139422 to your computer and use it in GitHub Desktop.

Select an option

Save palfrey/139422 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Remove left blank in Google results
// @namespace http://tevp.net/projects/
// @description Remove left blank in Google results
// @include http://www.google.*/search*
// ==/UserScript==
function xpath(query) {
return document.evaluate(query, document, null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
}
var allDivs = xpath("//div[@id='res']|//div[@id='ssb']");
for (var i = 0; i < allDivs.snapshotLength; i++) {
var thisDiv = allDivs.snapshotItem(i);
thisDiv.style.margin = "0px";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment