Skip to content

Instantly share code, notes, and snippets.

@shikakun
Created December 15, 2013 02:35
Show Gist options
  • Save shikakun/7968139 to your computer and use it in GitHub Desktop.
Save shikakun/7968139 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name tatodesignDetailOpenNewTab
// @namespace http://shikakun.com/
// @description Tatodesign の部屋の詳細ページを新しいタブで開けるようにします
// @include http://www.tatodesign.jp/*
// @grant none
// ==/UserScript==
$(function() {
$('#room_list').find('.section').each(function () {
var href = $(this).find('.img').find('a').attr('href');
href = href.match(/(.*)(\/room\/detail\.html\?houseno\=)(\d+)(\'\)\;)/);
var houseno = href[3];
$(this).find('a').attr({
'href': '/room/detail.html?houseno=' + houseno,
'target': '_blank'
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment