diff options
author | Dan Finlay <542863+danfinlay@users.noreply.github.com> | 2018-04-18 04:36:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-18 04:36:21 +0800 |
commit | 6ee57dcad70057b1f71b9abe53d9d4965cbbe3e8 (patch) | |
tree | 096c6a8f7e12c5ece8bb64af1466bb2d94b6e5d3 /docs/jsdocs/platforms_extension.js.html | |
parent | f15b81089e86dc095983faeba4a97209ddd670ce (diff) | |
parent | 7b70804aa0d74120098a4bcb2c375d29080e8368 (diff) | |
download | tangerine-wallet-browser-6ee57dcad70057b1f71b9abe53d9d4965cbbe3e8.tar tangerine-wallet-browser-6ee57dcad70057b1f71b9abe53d9d4965cbbe3e8.tar.gz tangerine-wallet-browser-6ee57dcad70057b1f71b9abe53d9d4965cbbe3e8.tar.bz2 tangerine-wallet-browser-6ee57dcad70057b1f71b9abe53d9d4965cbbe3e8.tar.lz tangerine-wallet-browser-6ee57dcad70057b1f71b9abe53d9d4965cbbe3e8.tar.xz tangerine-wallet-browser-6ee57dcad70057b1f71b9abe53d9d4965cbbe3e8.tar.zst tangerine-wallet-browser-6ee57dcad70057b1f71b9abe53d9d4965cbbe3e8.zip |
Merge branch 'master' into i3580-InternationalizeCurrency
Diffstat (limited to 'docs/jsdocs/platforms_extension.js.html')
-rw-r--r-- | docs/jsdocs/platforms_extension.js.html | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/docs/jsdocs/platforms_extension.js.html b/docs/jsdocs/platforms_extension.js.html new file mode 100644 index 000000000..c75f6c108 --- /dev/null +++ b/docs/jsdocs/platforms_extension.js.html @@ -0,0 +1,117 @@ +<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <meta name="google" content="notranslate">
+ <meta http-equiv="Content-Language" content="en">
+ <title>platforms/extension.js - Documentation</title>
+
+ <script src="scripts/prettify/prettify.js"></script>
+ <script src="scripts/prettify/lang-css.js"></script>
+ <script
+ src="https://code.jquery.com/jquery-3.1.1.min.js"
+ integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
+ crossorigin="anonymous"></script>
+ <script src="scripts/semantic.min.js"></script>
+ <!--[if lt IE 9]>
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ <link type="text/css" rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
+ <link type="text/css" rel="stylesheet" href="styles/prettify.css">
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
+ <link type="text/css" rel="stylesheet" href="styles/semantic.min.css">
+ <link type="text/css" rel="stylesheet" href="styles/override.css">
+</head>
+<body>
+
+<input type="checkbox" id="nav-trigger" class="nav-trigger" />
+<label for="nav-trigger" class="navicon-button x">
+ <div class="navicon"></div>
+</label>
+
+<label for="nav-trigger" class="overlay"></label>
+
+<nav>
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><div class="ui vertical accordion"><div class="title"><div class="ui list"><div class="item"><i class="inverted dropdown icon"></i><a href="module.exports_module.exports.html">exports</a></div></div></div></li></div></ul><h3><a href="global.html">Global</a></h3>
+</nav>
+
+<div id="main">
+
+ <h1 class="page-title">platforms/extension.js</h1>
+
+
+
+
+
+
+
+ <section>
+ <article>
+ <pre class="prettyprint source linenums"><code>const extension = require('extensionizer') + +/** + * An object that provides a variety of platform-specific functions. + * + * @typedef {object} Platform + * + * @property {Function} reload - A function to reload the application. + * @property {Function} openWindow - Opens a URL in the web browser. + * @property {Function} getVersion - Gets the current version of MetaMask. + * @property {Function} openExtensionInBrowser - Opens the MetaMask UI in a full window. + * @property {Function} getPlatformInfo - Callback function that returns info about the current platform. + */ + +class ExtensionPlatform { + + // + // Public + // + reload () { + extension.runtime.reload() + } + + openWindow ({ url }) { + extension.tabs.create({ url }) + } + + getVersion () { + return extension.runtime.getManifest().version + } + + openExtensionInBrowser () { + const extensionURL = extension.runtime.getURL('home.html') + this.openWindow({ url: extensionURL }) + } + + getPlatformInfo (cb) { + try { + extension.runtime.getPlatformInfo((platform) => { + cb(null, platform) + }) + } catch (e) { + cb(e) + } + } +} + +module.exports = ExtensionPlatform +</code></pre>
+ </article>
+ </section>
+
+
+
+
+</div>
+
+<br class="clear">
+
+<footer>
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Apr 12 2018 14:37:39 GMT-0700 (PDT) using the radgrad jsdoc theme. Derived from docdash.
+</footer>
+
+<script>prettyPrint();</script>
+<script src="scripts/linenumber.js"></script>
+<script>$('.ui.accordion').accordion();</script>
+</body>
+</html>
|