2

「Ikneemereen!」をクリックする必要があります。Greasemonkeyとのリンク。

リンク(http://www.ibood.com/nl/nlにあります):

<div class="box_order_btn">
    <a class="btn_order nl" href="https://order.ibood.com/nl/nl/order/?id=33869&amp;h=e82f93d244de247a3b73477381eb8a40" title="Ik neem er een!">Ik neem er een!</a>
    <span class="sold_out">Uitverkocht!</span>
</div>

私が試したGreasemonkeyスクリプト:

// ==UserScript==
// @name           Click the link
// @include        https://*.ibood.com/*
// @version       1.0
// @history       1.0 Initial release       
// ==/UserScript==

var TargetLink          = $("a:contains('Ik neem er een!')")

if (TargetLink  &&  TargetLink.length) 
    window.location.href    = TargetLink[0].href
4

1 に答える 1

1

そのスクリプトはjQueryを使用します(ビットは強力なインジケーターです)が、メタデータセクションではjQueryを 使用$(...)しません。@require

使用する:

// ==UserScript==
// @name     Ibood, click the link
// @include  https://*.ibood.com/*
// @include  http://*.ibood.com/*
// @version  1.0
// @history  1.0 Initial release
// @require  http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @grant    GM_addStyle
// ==/UserScript==
/*- The @grant directive is needed to work around a design change
    introduced in GM 1.0.   It restores the sandbox.
*/

var TargetLink          = $("a:contains('Ik neem er een!')")
if (TargetLink.length)
    window.location.assign (TargetLink[0].href);
于 2013-02-24T09:40:45.077 に答える