forked from mdn/webextensions-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding example of protocol_handlers (mdn#451)
Thanks @tsl143 all looking good.
- Loading branch information
Showing
4 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# open-irc-links | ||
|
||
|
||
## What it does | ||
|
||
This add-on sets the default client for opening IRC links using `protocol_handlers`. | ||
|
||
Whenever a link using the IRC protocol is clicked, the link is opened in the URI defined in the add-on's manifest. | ||
In this example, all IRC protocol links are opened in mibbit.com. | ||
For example, once you've installed the extension, click this link [irc://irc.freenode.net/drupal](irc://irc.freenode.net/drupal) and the protocol handler opens the Drupal channel in mibbit.com. | ||
|
||
## What it shows | ||
|
||
How to use protocol handlers to pass content to an application or website designed to handle that content. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"manifest_version": 2, | ||
"name": "IRC Protocol Handler", | ||
"description": "Demos the usage of protocol_handlers", | ||
"version": "1.0.0", | ||
"icons": { | ||
"64": "icons/icon.png" | ||
}, | ||
"protocol_handlers": [ | ||
{ | ||
"protocol": "irc", | ||
"name": "IRC Mibbit Extension", | ||
"uriTemplate": "https://mibbit.com/?url=%s" | ||
} | ||
] | ||
} |