Skip to content

Commit

Permalink
Load options page bar preview upon DOM ready.
Browse files Browse the repository at this point in the history
Apparently switching on CSP caused the iframe content to be unable to
access chrome.extension. Loading the iframe after the options page DOM
seems to work around this issue.
  • Loading branch information
chromakode committed Sep 4, 2012
1 parent ab9a3f6 commit f3cde48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/options.html
Expand Up @@ -13,7 +13,7 @@
<h1><img src="/images/shine.svg" alt="logo"/>reddit companion options</h1>
<div id="contents">
<section class="bar">
<shinebar><iframe src="bar.html#_shine_demo"></iframe></shinebar>
<shinebar><iframe></iframe></shinebar>
<div class="options">
<ul>
<li class="showPageActionLine"><input type="checkbox" id="showPageAction"> <label for="showPageAction">display icon in address bar</label></li>
Expand Down
2 changes: 2 additions & 0 deletions src/options.js
@@ -1,4 +1,6 @@
$(document).ready(function() {
$('shinebar iframe').attr('src', chrome.extension.getURL('bar.html') + '#_shine_demo')

var messages = [
'greetings, human.',
'someone is wrong on the internet!',
Expand Down

0 comments on commit f3cde48

Please sign in to comment.