add an option to prevent Isso from appending the default CSS, closes #29

This commit is contained in:
Martin Zimmermann 2013-11-06 17:46:04 +01:00
parent c06c11aeca
commit 6f3a2d8072
3 changed files with 19 additions and 5 deletions

View File

@ -132,6 +132,15 @@ You can configure the client (the JS part) via `data-` attributes:
<script data-isso="/isso" src="/path/to/embed.min.js"></script>
```
* data-isso-css
Set to `false` prevents Isso from automatically appending the stylesheet.
Defaults to `true`.
```html
<script src="..." data-isso-css="false"></script>
```
### Webserver configuration
* nginx configuration to run Isso on `/isso`:

View File

@ -6,7 +6,9 @@ define(["q"], function(Q) {
Q.longStackSupport = true;
var salt = "Eech7co8Ohloopo9Ol6baimi",
config = {},
config = {
"css": true
},
location = window.location.pathname;
var rules = {

View File

@ -8,10 +8,13 @@ require(["ready", "app/api", "app/isso", "app/count", "app/dom", "app/markup", "
"use strict";
domready(function() {
var style = $.new("style");
style.type = "text/css";
style.textContent = css.inline;
$("head").append(style);
if (api.config["css"]) {
var style = $.new("style");
style.type = "text/css";
style.textContent = css.inline;
$("head").append(style);
}
count();