2016-08-07 30 views
-1

が、これは私のコードです:Chrome拡張機能コンテンツスクリプト

マニフェスト

{ 
    "manifest_version": 2, 
    "name": "Test", 
    "description": "foo", 
    "version": "1.0", 
    "browser_action": { 
     "default_icon": "icon.png", 
     "default_popup": "popup.html" 
    }, 
    "options_ui": { 

     "page": "options.html", 

     "chrome_style": true 

    }, 
    "permissions": [ 
     "activeTab", 
     "storage", 
     "https://google.com/*" 
    ], 
    "content_scripts": [{ 
     "matches": ["http://google.com/*"], 
     "js": ["jquery-3.1.0.min.js", "simply-toast.min.js"], 
     "css": ["simply-toast.min.css"], 
     "run_at": "document_end" 
    }] 
} 

content.js

... 

$.simplyToast('success', 'This is a success message!'); // Line 72 

jQueryの正常に動作しますが、私simpleToastを試してみるときにこのエラーが出るcontent.js:72 Uncaught TypeError: $.simplyToast is not a function。私がここで何が欠けているのか分からない。

+1

「simpleToastを試したときにこのエラーが表示されます - あなたはどこで試していますか? manifest.jsonに宣言されたコンテンツスクリプトはありません。また、なぜ 'http://'ではなく 'https:// 'ではないのですか? – wOxxOm

答えて

0

間違った構文だと思います!

$.simplyToast('This is a success message', 'success'); // Line 72 
関連する問題