ブックマークレットからフォームに文字列を入れたい
特定のサイトのフォームを自動で埋めるスクリプトを書いています。
メールアドレス用の input type=text 要素の value 属性に値を入れたら以下のエラーメッセージが発生しました。
発生している問題・エラーメッセージ
A parser-blocking, cross site (i.e. different eTLD+1) script, https://hoge.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
該当のソースコード
HTML5
1<!-- /.tipView --> 2<input type="text" name="mail" id="mail" maxlength="64" value="" class="txtbox empty" placeholder="連絡用メールアドレス" tabindex="10">
JavaScript
1const mailEle = document.querySelector("#mail"); 2mailEle.value = 'foo@bar.com'
試したこと
Developer Tool のコンソールから値を入れると正常に機能します。
しかし、ブックマークレットから行うと上記エラーが出ます。
ブックマークレットからは無理でしょうか?
もしそうであれば、他の手段を教えてください。
あなたの回答
tips
プレビュー