Done, but to no avail: <div class="charsheet">
<input type="text" class="sheet-status-name" name="attr_status">
<input type="number" class="sheet-hitpoints" name="attr_hitpoints" value="0">
<script type="sheet/worker">
on("change:hitpoints", function() {
getAttrs(["hitpoints"], function(values) {
var output = "";
var temphp = parseInt(values.hitpoints) || 0;
console.log('temphp : ' + temphp);
if (temphp < 0) {
output = "DEAD";
}
else {
output = "ALIVE";
}
setAttrs({
status: output
});
});
});
</script>
</div>
I couldn't find the console log entry for the temphp var, but here's the log anyways: Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' https://*.googlesyndication.com https://*.doubleclick.net <a href="https://partner.googleadservices.com" rel="nofollow">https://partner.googleadservices.com</a> <a href="https://www.googletagservices.com" rel="nofollow">https://www.googletagservices.com</a> <a href="https://ssl.google-analytics.com" rel="nofollow">https://ssl.google-analytics.com</a> <a href="https://www.google-analytics.com" rel="nofollow">https://www.google-analytics.com</a> <a href="https://ajax.googleapis.com" rel="nofollow">https://ajax.googleapis.com</a> <a href="http://ajax.googleapis.com" rel="nofollow">http://ajax.googleapis.com</a> <a href="https://d3clqjduf2gvxg.cloudfront.net" rel="nofollow">https://d3clqjduf2gvxg.cloudfront.net</a> <a href="https://cdn.firebase.com" rel="nofollow">https://cdn.firebase.com</a> https://*.firebaseio.com https://*.tokbox.com https://*.opentok.com <a href="http://static.opentok.com" rel="nofollow">http://static.opentok.com</a> <a href="http://www.google-analytics.com" rel="nofollow">http://www.google-analytics.com</a> <a href="http://cdn.crowdin.com" rel="nofollow">http://cdn.crowdin.com</a> <a href="https://crowdin.com" rel="nofollow">https://crowdin.com</a> <a href="http://stun.l.google.com" rel="nofollow">http://stun.l.google.com</a>". Either the 'unsafe-inline' keyword, a hash ('sha256-nf5TAjcNzIYoTeqbYyT+OultDPzQ4idh5rgHHaJiA9s='), or a nonce ('nonce-...') is required to enable inline execution.
app.roll20.net/:13 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' https://*.googlesyndication.com https://*.doubleclick.net <a href="https://partner.googleadservices.com" rel="nofollow">https://partner.googleadservices.com</a> <a href="https://www.googletagservices.com" rel="nofollow">https://www.googletagservices.com</a> <a href="https://ssl.google-analytics.com" rel="nofollow">https://ssl.google-analytics.com</a> <a href="https://www.google-analytics.com" rel="nofollow">https://www.google-analytics.com</a> <a href="https://ajax.googleapis.com" rel="nofollow">https://ajax.googleapis.com</a> <a href="http://ajax.googleapis.com" rel="nofollow">http://ajax.googleapis.com</a> <a href="https://d3clqjduf2gvxg.cloudfront.net" rel="nofollow">https://d3clqjduf2gvxg.cloudfront.net</a> <a href="https://cdn.firebase.com" rel="nofollow">https://cdn.firebase.com</a> https://*.firebaseio.com https://*.tokbox.com https://*.opentok.com <a href="http://static.opentok.com" rel="nofollow">http://static.opentok.com</a> <a href="http://www.google-analytics.com" rel="nofollow">http://www.google-analytics.com</a> <a href="http://cdn.crowdin.com" rel="nofollow">http://cdn.crowdin.com</a> <a href="https://crowdin.com" rel="nofollow">https://crowdin.com</a> <a href="http://stun.l.google.com" rel="nofollow">http://stun.l.google.com</a>". Either the 'unsafe-inline' keyword, a hash ('sha256-gCgVkAhT4jg1bWpbaHmyMrHQxNIEPZFk50qjzDbMloA='), or a nonce ('nonce-...') is required to enable inline execution.
app.js:31 70
app.js:31 TOUCH SUPPORTED: false
app.js:31 USING WEBGL ACCELERATION...
app.js:31 WEBGL STARTUP SUCCESS
app.js:33 Custom Sheet Translation
app.js:26 select
app.js:26 Switch mode to select
app.js:42 Initializing new dice engine with randomness...
app.js:42 Using random entropy
app.js:46 Compiling sheet...
app.js:46 Finding sheet rolls...
app.js:47 window resize
app.js:32 Final set zoom!
app.js:31 UPDATE GL SIZE!
app.js:32 Final set zoom!
tutorial_tips.js:7 tuts loaded
app.js:38 Final page load.
app.js:48 Refresh jukebox List!
app.js:37 Auth'ed.
app.js:37 Go post auth!
app.js:37 initial setup
app.js:35 T.r_callbacks: Object_changing: false_escapedAttributes: Object_pending: Object_previousAttributes: Object_silent: ObjectactivePage: ()activePageIndex: 0attributes: Objectbootstrapped: truecardtrades: T.rchanged: Objectcharacters: T.rcid: "c0"currentOrderArray: Array[0]currentPlaylistPlayingID: ()custFx: T.rdecks: T.rfbauthinfo: ObjectgameFullyLoaded: truegetPageIndex: ()handlePlayerPageChanges: (t)handouts: T.rhands: T.rinitActivePage: ()initiativewindow: T.rpages: T.rparentRef: Xplayers: T.rrollabletables: T.rshowSettings: ()switchPageById: ()switchPageByIndex: ()tokendisplay: Objectview: T.r__proto__: t.Model
app.js:37 Got players value...
app.js:37 joining game...
2app.js:35 Full load page!
app.js:37 We have 2 pages
app.js:35 Player -KaOTj5Zwix1SpMnrEup is offline...
app.js:14 THREE.WebGLRenderer 69
app.js:36 Global Volume: 100=1
app.js:37 Deferred finish joining...
app.js:31 Firebase Online
app.js:44 Loading Roll20 Chat Event Handlers
app.js:37 handle page changes
app.js:37 false
app.js:40 refershing page listings!
app.js:33 Do refresh link cache!
app.js:45 Refresh Journal List!
app.js:45 Search took 7ms
app.js:37 init active page!
app.js:35 activate page!
app.js:35 FULLY ACTIVATE VIEWS FOR PAGE.
app.js:35 Graphics: 0
app.js:35 Paths: 0
app.js:35 Reorder by ZORDER
app.js:38 Scan for new plays!
app.js:40 refershing page listings!
app.js:48 Refresh jukebox List!
7app.js:44 Didn't find a roll template called 'pf_check'
d20.textchat.incoming @ app.js:44
2app.js:44 Didn't find a roll template called 'PFAttack'
d20.textchat.incoming @ app.js:44
8app.js:44 Didn't find a roll template called 'pf_check'
d20.textchat.incoming @ app.js:44
app.js:39 Show Character View Dialog!
app.js:38 --- RENDER CHARACTIVE VIEW ----
app.js:38 Redoing charsheet html
app.js:38 7ms to end of html
app.js:33 239
app.js:38 Really updating character sheet values
app.js:38 Setting up repeating sections took until 0ms
app.js:38 Updating ALL VALUES
app.js:38 Finding list of dirty attributes took until 0ms
app.js:38 Querytest took until 0ms
app.js:38 Attribute cache compliation took until 0ms
app.js:38 Set values (including auto-calcuating variables) took until 1ms
app.js:38 Appending to screen took until 1ms
app.js:38 Took 1ms
app.js:38 Really updating character sheet values
app.js:38 Setting up repeating sections took until 0ms
app.js:38 Finding list of dirty attributes took until 0ms
app.js:38 Querytest took until 0ms
app.js:38 Attribute cache compliation took until 0ms
app.js:38 Set values (including auto-calcuating variables) took until 1ms
app.js:38 Took 1ms
app.js:39 blankVal, don't save
app.js:47 window resize
app.js:32 Final set zoom!
app.js:31 UPDATE GL SIZE!
app.js:32 Final set zoom!