Penneo Browser Utilities
Installation
Add the script to your HTML page. You can use the CDN version from https://cdn.jsdelivr.net/gh/penneo/browser-uri-utils/bin/browser-utils.min.js
, or host it yourself and target directly to it.
<!-- index.html -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/penneo/browser-uri-utils/bin/browser-utils.min.js"></script>
NPM and Bower installations will be available soon.
Usage
To enhance any link <a>
element in a website to integrate Penneo, you only need the link, the data and the script above to be included.
In HTML, create a link with a temporary href
.
<a id="penneo-link" href="#">Link to Penneo</a>
In javascript
- Create the payload to be sent to the Penneo Desktop application accoding to the URI Schema for the integration.
- Select the link element
- Enhance the link with the global
penneoLink
function that the script exposes.
<script type="text/javascript">
var data = {name: 'Test Casefile'};
var link = document.getElementById('penneo-link');
penneoLink(data, link);
</script>
Full example will be made available soon.