Created
December 15, 2013 02:35
-
-
Save shikakun/7968139 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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