私は複数のウィンドウ位置セレクタを取得する必要があります。探している結果は、テストアラートポップアップです。私は何が間違っているのか分かりません。私はGreaseMonkeyでこれを使用しています。jQuery:multiple "window.location.href" not working
// ==UserScript==
// @name b
// @namespace d
// @description b
// @include *www.*
// @include http://*
// @include https://*
// @version 1
// @grant none
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js
// ==/UserScript==
$(document).ready(function()
{ if( (!window.location.href("https://www.youtube.com") > -1)
& (!window.location.href("https://www.google.com") > -1)
)
{
alert("I am an alert box!");
}
});
hrefは方法ではありません.... – epascarello
また、ドキュメントの準備が完了するのを待つことはほとんど役に立たないDOMが準備ができていなくても利用可能です)。 –
なぜ@MarcoBonelliは実行されませんか?ドキュメントが準備ができていれば即座に起動します – charlietfl