Skip to content

Instantly share code, notes, and snippets.

@tarao
Created May 8, 2010 03:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarao/394299 to your computer and use it in GitHub Desktop.
Save tarao/394299 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name googlerightside
// @namespace http://orezdnu.org/
// @include http://www.google.co.jp/search*
// @include http://www.google.com/search*
// ==/UserScript==
(function(d) {
var $ = function(id){ return d.getElementById(id); };
var center = $('center_col');
if (!$('rhs') && center) {
var rhs = d.createElement('div');
rhs.id = 'rhs';
rhs.style.borderLeft = '1px solid rgb(211,225,249)';
rhs.style.position = 'absolute';
rhs.style.right = 0;
rhs.style.top = 0;
rhs.style.width = '264px';
center.parentNode.insertBefore(rhs, center.nextSibling);
var rhsb = d.createElement('div');
rhsb.id = 'rhs_block';
rhsb.style.paddingTop = '5px';
rhsb.style.position = 'relative';
rhsb.style.left = 0;
rhsb.style.top = 0;
rhs.appendChild(rhsb);
var table = d.createElement('table');
table.id = 'mbEnd';
table.cellSpacing = 0;
table.cellPadding = 0;
table.style.padding = 0;
table.style.whiteSpace = 'nowrap';
rhsb.appendChild(table);
var tbody = d.createElement('tbody');
table.appendChild(tbody);
var hbs = $('hBookmark-search');
if (hbs) {
hbs.parentNode.removeChild(hbs);
var tr = d.createElement('tr');
var td = d.createElement('td');
tbody.appendChild(tr);
tr.appendChild(td);
td.appendChild(hbs);
}
}
if (center) {
center.parentNode.style.marginRight = '1em';
}
})(document);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment