Created
March 30, 2018 11:30
-
-
Save creesch/1e50205abc5f9cf767fd45cac6410510 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function handleEvent(e) { | |
| console.log(e); | |
| } | |
| const readyEvent = new CustomEvent('reddit.ready', { | |
| detail: { | |
| name: 'fakeConsumer' | |
| } | |
| }); | |
| document.addEventListener('reddit', handleEvent, true); | |
| document.dispatchEvent(readyEvent); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "manifest_version": 2, | |
| "name": "jsAPI", | |
| "author": "toolbox team", | |
| "short_name": "jsAPI", | |
| "description": "jsAPI.", | |
| "version": "1.0.0", | |
| "applications": { | |
| "gecko": { | |
| "strict_min_version": "46.0" | |
| } | |
| }, | |
| "permissions": [ | |
| "https://*.reddit.com/", | |
| "http://*.reddit.com/" | |
| ], | |
| "content_scripts": [ | |
| { | |
| "run_at": "document_end", | |
| "matches": [ | |
| "http://*.reddit.com/*", | |
| "https://*.reddit.com/*" | |
| ], | |
| "js": [ | |
| "jsapi.js" | |
| ] | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment