Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
adamschwartz committed Oct 30, 2015
0 parents commit f373d61
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
12 changes: 12 additions & 0 deletions body.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(function(w, d){
w['_brSiteId'] = INSTALL_OPTIONS.siteId;
function br() {
var i='browsi-js'; if (d.getElementById(i)) {return;}
var siteId = /^[a-zA-Z0-9]{1,7}$/.test(w['_brSiteId']) ? w['_brSiteId'] : null;
var js=d.createElement('script'); js.id=i; js.async=true;
js.src='//js.brow.si/' + ( siteId != null ? siteId + '/' : '' ) + 'br.js';
(d.head || d.getElementsByTagName('head')[0]).appendChild(js);
}
d.readyState == 'complete' ? br() :
( w.addEventListener ? w.addEventListener('load', br, false) : w.attachEvent('onload', br) );
})(window, document);
21 changes: 21 additions & 0 deletions install.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"resources": {
"body": [
{
"type": "script",
"src": "body.js"
}
]
},
"options": {
"properties": {
"sideId": {
"order": 1,
"title": "Brow.si Site ID",
"description": "Get this from the <a class=\"with-inherited-color with-underline\" href=\"https://dashboard.brow.si/dashboard/create\" target=\"_blank\">Brow.si Dashboard</a>.",
"type": "string",
"placeholder": "T25jHB"
}
}
}
}

0 comments on commit f373d61

Please sign in to comment.