Skip to content

Instantly share code, notes, and snippets.

@syusui-s
Last active August 29, 2015 13:56
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 syusui-s/9108854 to your computer and use it in GitHub Desktop.
Save syusui-s/9108854 to your computer and use it in GitHub Desktop.
動くかまだ試してない
// ==UserScript==
// @name Google Image Tab Before Style
// @namespace GoogleImgTabBeforeStyle
// @description Googleの画像タブの位置を以前の位置へ移動する
// @include /^https:\/\/.*google\..*\/.*&q=.*$/
// ==/UserScript==
function imgNode(nodes) {
for (var i = 0; i < nodes.length; ++i) {
if (nodes[i].innerText == '画像') return nodes[i];
}
return false;
}
var node = imgNode(document.getElementsByClassName('hdtb_mitem'));
var menu = document.getElementById('hdtb_msb');
menu.removeChild(node);
menu.insertBefore(node, menu.childNodes[1]);
console.log("test");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment