onmousedown属性を削除するGreasemonkey/Tampermonkeyのユーザースクリプトを開発していますGoogle検索結果ページのタグ。
プラグインは、スクリプトが実行中であり、スクリプトが実行されていることを示しますが、何も起こりません。
コンソールを開いて手動で実行しようとしましたが、セレクターは最初のコンソールのみを選択しますページで。
私は試しました:
$("a")
$("a.l")
$(".l")
また、document-start、document-body、document-endでユーザースクリプトの位置を変更しようとしましたが、結果は同じです。一致する最初の要素のみが返されます。
スクリプトコード:
// ==UserScript==
// @name Google onmousedown remove
// @version 0.1
// @include /^https?://[a-z]*\.?google\.[a-z\.]+/search.*/
// @require http://code.jquery.com/jquery-1.9.1.min.js
// @run-at document-end
// ==/UserScript==
$(document).ready(function (){
$("a.l").each(function (){ $(this).removeAttr("onmousedown"); });
});
問題はどこにありますか?ありがとう。