質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
JavaScript

JavaScriptは、プログラミング言語のひとつです。ネットスケープコミュニケーションズで開発されました。 開発当初はLiveScriptと呼ばれていましたが、業務提携していたサン・マイクロシステムズが開発したJavaが脚光を浴びていたことから、JavaScriptと改名されました。 動きのあるWebページを作ることを目的に開発されたもので、主要なWebブラウザのほとんどに搭載されています。

Q&A

解決済

1回答

2348閲覧

injection.jsに関するエラーについて

hayakawatakuma

総合スコア21

JavaScript

JavaScriptは、プログラミング言語のひとつです。ネットスケープコミュニケーションズで開発されました。 開発当初はLiveScriptと呼ばれていましたが、業務提携していたサン・マイクロシステムズが開発したJavaが脚光を浴びていたことから、JavaScriptと改名されました。 動きのあるWebページを作ることを目的に開発されたもので、主要なWebブラウザのほとんどに搭載されています。

0グッド

0クリップ

投稿2019/04/04 09:04

編集2019/04/05 06:44

デベロッパーツールにコンソール画面にて、
下記エラー?が表示されます。
イメージ説明
injection.jsに関するエラーと表示されておりますが、よく分からず。。。。
こちらの表記を削除するにはどうしたらいいか教えて頂けますか?

試したこと
jsに関するエラーかと推測し、jsファイルを全て削除してみましたがダメでした。。

追記-----------------------

作業環境:gulp
PC:mac OS
検証ブラウザ:Chrome

自身のPCおよびChromeのコンソール画面にのみ(他のブラウザでは特に表示されず。)表示されるエラーでした。
(他の方のChromeのコンソール画面では表示されませんでした)

HTML

1<!doctype html> 2<html lang="ja"> 3 4<head> 5 <meta charset="utf-8"> 6 <title>テスト</title> 7 <meta name="description" content=""> 8 <meta name="keywords" content=""> 9 <meta name="viewport" content="width=device-width"> 10 <meta property="og:type" content="website"> 11 <meta property="og:site_name" content=""> 12 <meta property="og:url" content="[サイトURL絶対パス]"> 13 <meta property="og:title" content=""> 14 <meta property="og:description" content=""> 15 <!-- ↓アイコン --> 16 <link rel="icon" type="image/x-icon" href="/shared/img/favicon.ico"> 17 <!-- ↓stylesheets --> 18 <link rel="stylesheet" href="css/style.css"> 19 <link rel="stylesheet" href="css/slick-theme.css"> 20 <link rel="stylesheet" href="css/slick.css"> 21</head> 22 23<body id="top"> 24 <div class="container"> 25 <!--#include virtual="shared/include/header.html"--> 26 <!--#include virtual="shared/include/side_menu.html"--> 27 28 <div class="bodyArea"> 29 <!-- この中にコンテンツ --> 30 <main class="main_contants"> 31 <section class="top-sec"> 32 <div class="slick-slider"> 33 <div><a href=""><img src="/shared/img/top/slide1.png" alt="スライド1"></a></div> 34 </div> 35 </section> 36 37 <section class="top-sec01"> 38 <div class="section-in flex f-sb f-wp"> 39 <div class="news-ttl-box"> 40 <h2>新着情報<span>NEWS</span></h2> 41 </div> 42 <div class="news-list-box"> 43 <a href=""> 44 <dl> 45 <dt><time>2019.2</time>タイトル</dt> 46 <dd>テキストテキストテキストテキストテキストテキスト</dd> 47 </dl> 48 </a> 49 50 <p class="taC"><a href="" class="default-btn">ニュース一覧</a></p> 51 </div> 52 </div> 53 </section> 54 55 <section class="top-sec02"> 56 <div class="section-in"> 57 <ul class="flex f-sb f-wp"> 58 <li><a href=""><img src="/shared/img/top/top_sec02_bnr1.jpg" alt=""></a></li> 59 <li><a href=""><img src="/shared/img/top/top_sec02_bnr2.jpg" alt=""></a></li> 60 <li><a href=""><img src="/shared/img/top/top_sec02_bnr3.jpg" alt=""></a></li> 61 </ul> 62 </div> 63 </section> 64 <!--#include virtual="shared/include/footer.html"--> 65 </main> 66 <!-- ここまでコンテンツ --> 67 </div><!-- /.bodyArea --> 68 </div><!-- /.container --> 69 70 <!-- ↓js --> 71 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> 72 <script src="shared/js/slick.min.js"></script> 73 <script src="shared/js/common.js"></script> 74</body> 75 76</html> 77

SASS

1 2 3/*-------------------------------------------------------------- 4 html/body 5---------------------------------------------------------------*/ 6* { 7 box-sizing: border-box; 8} 9 10html { 11 font-size: 62.5%; 12} 13 14body { 15 color: #333; 16 line-height: 1.2; 17 word-break: break-word; 18 width: 100%; 19 font-weight: 300; 20 font-size: 1.6rem; 21 letter-spacing: 0.01em; 22} 23/*------------------------------------------------------ 24 ボタン 25--------------------------------------------------------*/ 26.default-btn { 27 display: inline-block; 28 width: 300px; 29 text-align: center; 30 text-decoration: none; 31 outline: none; 32 height: 45px; 33 line-height: 43px; 34 transition: 0.3s; 35 background-color: #821717; 36 border: 2px solid #821717; 37 color: #fff; 38 border-radius: 50px; 39 position: relative; 40 font-weight: 600; 41 42 &:after { 43 content: ""; 44 display: block; 45 width: 8px; 46 height: 8px; 47 border-top: 2px solid #fff; 48 border-right: 2px solid #fff; 49 transform: rotate(45deg); 50 position: absolute; 51 right: 25px; 52 top: calc(50% - 4px); 53 } 54 55 &:hover { 56 background-color: #fff; 57 border-color: #821717; 58 color: #821717; 59 60 &:after { 61 border-top: 2px solid #821717; 62 border-right: 2px solid #821717; 63 } 64 } 65} 66/*------------------------------------------------------ 67 ホバーアクション 68--------------------------------------------------------*/ 69a img { 70 transition: .2s; 71} 72 73a img:hover { 74 opacity: .6; 75} 76/*------------------------------------------------------ 77 78--------------------------------------------------------*/ 79.section-in { 80 max-width: 1200px; 81 width: 95%; 82 margin: 0 auto; 83 padding: 80px 0; 84} 85 86.main_contants > .section-in { 87 width: 95%; 88 padding: 80px 0 40px; 89} 90 91.main_contants { 92 left: 220px; 93 position: absolute; 94 width: calc(100% - 220px); 95 background: url(../../shared/img/under_bg1.jpg) no-repeat; 96 background-size: 100%; 97 background-position-x: right; 98} 99//-------------------------------------------------------------- 100// 1200px以上 101//-------------------------------------------------------------- 102@include media(ll) { 103 .section-in { 104 width: 1200px; 105 min-width: 950px; 106 } 107} 108//-------------------------------------------------------------- 109// タブレット 110//-------------------------------------------------------------- 111@include media(l) { 112 .section-in { 113 width: 95%; 114 } 115} 116//-------------------------------------------------------------- 117// スマートフォン 118//-------------------------------------------------------------- 119@include media(s) { 120 .main_contants { 121 left: 0; 122 top: 65px; 123 width: 100%; 124 overflow: hidden; 125 } 126 127 .section-in { 128 width: 100%; 129 max-width: 100%; 130 min-width: 100%; 131 padding: 60px 20px; 132 } 133 134 .main_contants > .section-in { 135 padding: 60px 20px 0; 136 } 137 //スイッチ 138 .pc { 139 display: none; 140 } 141 142 .sp { 143 display: block; 144 } 145 //ボタン 146 .default-btn { 147 width: 100%; 148 } 149 //タイトル / テキスト 150 .heading-l { 151 font-size: 3rem; 152 padding-left: 25px; 153 top: -25px; 154 155 &:before { 156 height: 125px; 157 } 158 } 159 160 .heading-m { 161 margin-bottom: 40px; 162 } 163 164 .default-txt { 165 text-align: justify; 166 } 167} 168 169/*-------------------------------------------------------------- 170TOP-CSS 171---------------------------------------------------------------*/ 172 173 174.under-bottom-img { 175 position: relative; 176 bottom: -90px; 177 max-width: 1200px; 178 margin: -100px auto 0; 179} 180 181#top { 182 183 .main_contants { 184 background: none; 185 } 186 187 .under-top-img { 188 display: none; 189 } 190 191 .top-sec { 192 .top-sec-bg { 193 position: absolute; 194 top: 0; 195 left: 0; 196 width: 30%; 197 z-index: -1; 198 } 199 } 200 //top-sec01----------------- 201 .top-sec01 { 202 background: url("../../shared/img/top/top_sec01_bg.jpg") no-repeat; 203 204 .news-ttl-box { 205 background: #fff; 206 width: 18%; 207 color: #7bb8fb; 208 padding: 1.6em; 209 min-height: 150px; 210 height: 100%; 211 212 h2 { 213 font-size: 2.2rem; 214 font-weight: bold; 215 span { 216 display: block; 217 margin-top: 5px; 218 } 219 } 220 } 221 222 .news-list-box { 223 width: 79%; 224 background: rgba(255,255,255,.7); 225 padding: 30px 40px; 226 227 dl { 228 border-bottom: 1px solid #a3a3a3; 229 padding-bottom: 20px; 230 margin-bottom: 20px; 231 232 dt { 233 color: #821717; 234 width: calc(100% - 70px); 235 font-weight: bold; 236 237 time { 238 width: 70px; 239 display: inline-block; 240 } 241 242 &::after { 243 content: ''; 244 display: inline-block; 245 width: 20px; 246 height: 20px; 247 background-image: url("../../shared/img/top/news_arrow.png"); 248 background-size: contain; 249 vertical-align: middle; 250 margin: -3px 0 0 7px; 251 } 252 } 253 254 dd { 255 margin-top: 10px; 256 margin-left: 70px; 257 } 258 } 259 } 260 } 261 //top-sec02------------------ 262 .top-sec02 { 263 ul { 264 li { 265 width: 49%; 266 267 &:last-child { 268 width: 100%; 269 margin-top: 1.5em; 270 } 271 } 272 } 273 } 274} 275//-------------------------------------------------------------- 276// スマートフォン 277//-------------------------------------------------------------- 278@include media(s) { 279 .under-top-img { 280 max-width: 100%; 281 } 282 283 .under-bottom-img { 284 bottom: 0; 285 margin-top: 0; 286 max-width: 100%; 287 } 288 289 #top { 290 //top-sec01----------------- 291 .top-sec01 { 292 background-size: cover; 293 294 .news-ttl-box { 295 width: 50%; 296 margin: 0 auto 20px; 297 height: auto; 298 min-height: auto; 299 background: none; 300 text-align: center; 301 padding: 0; 302 color: #fff; 303 } 304 305 .news-list-box { 306 width: 100%; 307 padding: 20px; 308 margin-top: 20px; 309 310 dl { 311 dt { 312 width: 100%; 313 } 314 315 dd { 316 margin-left: 0; 317 line-height: 1.4em; 318 } 319 } 320 } 321 322 .section-in { 323 padding: 60px 20px; 324 } 325 } 326 //top-sec02------------------ 327 .top-sec02 { 328 ul { 329 li { 330 width: 80%; 331 margin: 0 auto 25px; 332 333 &:last-child { 334 margin-top: 0; 335 } 336 } 337 } 338 } 339 340 .under-img-area { 341 bottom: 0; 342 margin-top: -120px; 343 } 344 } 345} 346

js

1 2$(function() { 3 4 5 6 // ハンバーガーメニュー開閉 7 $(".menu-mobile").click(function(e) { 8 $(".global_navi").toggleClass('show-on-mobile'); 9 e.preventDefault(); 10 }); 11 $('.menu-mobile').on('click', function() { 12 $(this).toggleClass('menu-active'); 13 return false; 14 }); 15 // closeボタンで閉じる 16 $(".menu_close").on('click', function() { 17 if ($(window).width() <= 767) { 18 $('.menu-mobile').removeClass('menu-active'); 19 $('.global_navi').removeClass('show-on-mobile'); 20 } 21 }); 22 23 24// サブメニューボタン開閉 25$(".sub_switch > a > span").click(function(e) { 26 if ($(window).width() <= 767) { 27 $(this).parents('.sub_switch').children("ul").fadeToggle(150); 28 $(this).parents('.sub_switch').toggleClass('menu-open'); 29 return false; 30 } 31}); 32 33//スムーススクロール 34var headerHight = 100; 35$('a[href^="#"]').on('click', function() { 36 var speed = 500; 37 var href = $(this).attr("href"); 38 var target = $(href == "#" || href == "" ? 'html' : href); 39 var position = target.offset().top - headerHight; 40 $('body,html').animate({ 41 scrollTop: position 42 }, speed, 'swing'); 43 return false; 44}); 45 46}); 47

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

sansaisoba

2019/04/04 09:29

エラーではなく、開発者向けのデバッグメッセージのように見えます。 どちらにせよ、injection.jsというものの正体がわからないので、どういう環境であるかの追加情報があった方が良いでしょう。 > jsファイルを全て削除 この対応方法は…ちょっとおかしいです。 必要なものだからjsファイルがあると思いますし、問題の解決ではなく蓋をしてるだけなので、問題解決能力はあがらないでしょう。 また、削除しても良いものであれば、そもそも残しておくべきではありません。
t_obara

2019/04/04 10:43

必要最小限の再現環境を作ってみてください。その上で、その際に発生するHTMLファイルやjavascriptファイルなどをご提示ください。
hayakawatakuma

2019/04/05 06:44

失礼いたしました。追加しました。
guest

回答1

0

ベストアンサー

ソース上でもinjection.jsというものを使用しているようには見えないことと、他のブラウザでは表示されないということで、
質問者様のChromeでのみ表示されているということになると思います。

何かしら拡張機能(Extention)はインストールされていませんか?
全ての拡張機能を無効にして再度試してみてください。

投稿2019/04/08 22:50

sansaisoba

総合スコア241

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

hayakawatakuma

2019/04/23 01:45

アドオンいったん全てOFFにしてみたところ消えました。 後はどのアドオンが原因か確認してみますね。 ありがとうございます!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問