view rakuten-books-direct-search.user.js @ 58:960d452dea99

Bump version to force updating to new repository
author nanaya <me@nanaya.pro>
date Thu, 23 Aug 2018 22:58:16 +0900
parents 09f735548b2c
children 3381a9cb88d1
line wrap: on
line source

// ==UserScript==
// @name         rakuten books direct search
// @namespace    https://myconan.net
// @version      1.0.3
// @description  Search on rakuten without tracking proxy
// @author       nanaya
// @match        https://books.rakuten.co.jp/*
// @match        http://books.rakuten.co.jp/*
// @match        https://*.books.rakuten.co.jp/*
// @match        http://*.books.rakuten.co.jp/*
// @grant        none
// @downloadURL  https://bitbucket.org/nanayapro/ec-userscripts/raw/tip/rakuten-books-direct-search.user.js
// ==/UserScript==

;(function() {
  var $ = jQuery;
  var $form = $("form[name='srchFrm']");

  if (!$form.length) { return; }
  
  var searchUrl = $form.find("input[name='R2']").attr("value");
  $form.attr("action", searchUrl);
}).call();