Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed extra class attr in options.html, added disqus selector for o…

…lder, non-iframe disqus threads
  • Loading branch information...
commit 5626bb4e5257a8ddf052cc337c077db2dd53c3f6 1 parent 2660d40
@barnabywalters authored
View
10 output/chrome/content_script.js
@@ -36,10 +36,12 @@ var OwnYourComments = (function () {
* Embeds an Indieweb comments box before Disqus or Livefyre iframes
*/
function embedCommentsBox() {
- $('iframe[data-disqus-uid]').each(function (i, el) {
+ $('iframe[data-disqus-uid], div#disqus_thread').each(function (i, el) {
var insertID = 'own-your-comments-embed-' + $(el).attr('data-disqus-uid');
- var insertFrame = $('<iframe />').attr('id', insertID);
+ var insertFrame = $('<iframe />')
+ .attr('id', insertID)
+ .css('width', '100%');
var properties = { url: window.location.href };
@@ -47,7 +49,9 @@ var OwnYourComments = (function () {
$('#' + insertID).attr('src', expandTemplates(url, properties));
});
- console.log('Inserting:', insertFrame, 'before:', el);
+ getOption('commentEmbedHeight', function (height) {
+ $('#' + insertID).css('height', height);
+ });
$(el).before(insertFrame);
});
View
2  output/chrome/options.html
@@ -53,7 +53,7 @@
<label><b>Disqus/Livefyre Embed URL</b> ⇒ <input id="commentEmbedURL" type="url" class="monitor" placeholder="http://example.org/notes/new?inReplyTo={url}" /></label>
- <label><b title="CSS height string">Height:</b> <input class="short" id="commentEmbedHeight" class="monitor" placeholder="5em"</b>
+ <label><b title="CSS height string">Height:</b> <input id="commentEmbedHeight" class="monitor short" placeholder="5em" /></label>
<div class="metadata">
<div class="notes">
View
4 output/chrome/options.js
@@ -1,4 +1,4 @@
-function saveURL(evt) {
+function saveOption(evt) {
kango.invokeAsync('kango.storage.setItem', $(evt.target).attr('id'), evt.target.value);
$('#notice').text('Unsaved Changes Made!').toggleClass('unsaved');
@@ -11,7 +11,7 @@ function main() {
$('.monitor').each(function () {
var self = $(this);
- self.keyup(saveURL);
+ self.keyup(saveOption);
kango.invokeAsync('kango.storage.getItem', self.attr('id'), function (url) {
self.val(url);
View
10 output/firefox/chrome/content/content_script.js
@@ -36,10 +36,12 @@ var OwnYourComments = (function () {
* Embeds an Indieweb comments box before Disqus or Livefyre iframes
*/
function embedCommentsBox() {
- $('iframe[data-disqus-uid]').each(function (i, el) {
+ $('iframe[data-disqus-uid], div#disqus_thread').each(function (i, el) {
var insertID = 'own-your-comments-embed-' + $(el).attr('data-disqus-uid');
- var insertFrame = $('<iframe />').attr('id', insertID);
+ var insertFrame = $('<iframe />')
+ .attr('id', insertID)
+ .css('width', '100%');
var properties = { url: window.location.href };
@@ -47,7 +49,9 @@ var OwnYourComments = (function () {
$('#' + insertID).attr('src', expandTemplates(url, properties));
});
- console.log('Inserting:', insertFrame, 'before:', el);
+ getOption('commentEmbedHeight', function (height) {
+ $('#' + insertID).css('height', height);
+ });
$(el).before(insertFrame);
});
View
2  output/firefox/chrome/content/options.html
@@ -53,7 +53,7 @@
<label><b>Disqus/Livefyre Embed URL</b> ⇒ <input id="commentEmbedURL" type="url" class="monitor" placeholder="http://example.org/notes/new?inReplyTo={url}" /></label>
- <label><b title="CSS height string">Height:</b> <input class="short" id="commentEmbedHeight" class="monitor" placeholder="5em"</b>
+ <label><b title="CSS height string">Height:</b> <input id="commentEmbedHeight" class="monitor short" placeholder="5em" /></label>
<div class="metadata">
<div class="notes">
View
4 output/firefox/chrome/content/options.js
@@ -1,4 +1,4 @@
-function saveURL(evt) {
+function saveOption(evt) {
kango.invokeAsync('kango.storage.setItem', $(evt.target).attr('id'), evt.target.value);
$('#notice').text('Unsaved Changes Made!').toggleClass('unsaved');
@@ -11,7 +11,7 @@ function main() {
$('.monitor').each(function () {
var self = $(this);
- self.keyup(saveURL);
+ self.keyup(saveOption);
kango.invokeAsync('kango.storage.getItem', self.attr('id'), function (url) {
self.val(url);
View
10 output/opera/content_script.js
@@ -36,10 +36,12 @@ var OwnYourComments = (function () {
* Embeds an Indieweb comments box before Disqus or Livefyre iframes
*/
function embedCommentsBox() {
- $('iframe[data-disqus-uid]').each(function (i, el) {
+ $('iframe[data-disqus-uid], div#disqus_thread').each(function (i, el) {
var insertID = 'own-your-comments-embed-' + $(el).attr('data-disqus-uid');
- var insertFrame = $('<iframe />').attr('id', insertID);
+ var insertFrame = $('<iframe />')
+ .attr('id', insertID)
+ .css('width', '100%');
var properties = { url: window.location.href };
@@ -47,7 +49,9 @@ var OwnYourComments = (function () {
$('#' + insertID).attr('src', expandTemplates(url, properties));
});
- console.log('Inserting:', insertFrame, 'before:', el);
+ getOption('commentEmbedHeight', function (height) {
+ $('#' + insertID).css('height', height);
+ });
$(el).before(insertFrame);
});
View
2  output/opera/options.html
@@ -53,7 +53,7 @@
<label><b>Disqus/Livefyre Embed URL</b> ⇒ <input id="commentEmbedURL" type="url" class="monitor" placeholder="http://example.org/notes/new?inReplyTo={url}" /></label>
- <label><b title="CSS height string">Height:</b> <input class="short" id="commentEmbedHeight" class="monitor" placeholder="5em"</b>
+ <label><b title="CSS height string">Height:</b> <input id="commentEmbedHeight" class="monitor short" placeholder="5em" /></label>
<div class="metadata">
<div class="notes">
View
4 output/opera/options.js
@@ -1,4 +1,4 @@
-function saveURL(evt) {
+function saveOption(evt) {
kango.invokeAsync('kango.storage.setItem', $(evt.target).attr('id'), evt.target.value);
$('#notice').text('Unsaved Changes Made!').toggleClass('unsaved');
@@ -11,7 +11,7 @@ function main() {
$('.monitor').each(function () {
var self = $(this);
- self.keyup(saveURL);
+ self.keyup(saveOption);
kango.invokeAsync('kango.storage.getItem', self.attr('id'), function (url) {
self.val(url);
View
BIN  output/ownyourcomments_0.9.crx
Binary file not shown
View
BIN  output/ownyourcomments_0.9.oex
Binary file not shown
View
BIN  output/ownyourcomments_0.9.xpi
Binary file not shown
View
4 output/safari/ownyourcomments_0.9.safariextension/Info.plist
@@ -4,8 +4,6 @@
<dict>
<key>Author</key>
<string>Barnaby Walters</string>
- <key>Builder Version</key>
- <string>6534.57.2</string>
<key>CFBundleDisplayName</key>
<string>Own Your Comments</string>
<key>CFBundleIdentifier</key>
@@ -19,7 +17,7 @@
<key>Chrome</key>
<dict>
<key>Database Quota</key>
- <real>10485760</real>
+ <real>10485760.0</real>
<key>Global Page</key>
<string>background.html</string>
<key>Popovers</key>
View
10 output/safari/ownyourcomments_0.9.safariextension/content_script.js
@@ -36,10 +36,12 @@ var OwnYourComments = (function () {
* Embeds an Indieweb comments box before Disqus or Livefyre iframes
*/
function embedCommentsBox() {
- $('iframe[data-disqus-uid]').each(function (i, el) {
+ $('iframe[data-disqus-uid], div#disqus_thread').each(function (i, el) {
var insertID = 'own-your-comments-embed-' + $(el).attr('data-disqus-uid');
- var insertFrame = $('<iframe />').attr('id', insertID);
+ var insertFrame = $('<iframe />')
+ .attr('id', insertID)
+ .css('width', '100%');
var properties = { url: window.location.href };
@@ -47,7 +49,9 @@ var OwnYourComments = (function () {
$('#' + insertID).attr('src', expandTemplates(url, properties));
});
- console.log('Inserting:', insertFrame, 'before:', el);
+ getOption('commentEmbedHeight', function (height) {
+ $('#' + insertID).css('height', height);
+ });
$(el).before(insertFrame);
});
View
2  output/safari/ownyourcomments_0.9.safariextension/options.html
@@ -53,7 +53,7 @@
<label><b>Disqus/Livefyre Embed URL</b> ⇒ <input id="commentEmbedURL" type="url" class="monitor" placeholder="http://example.org/notes/new?inReplyTo={url}" /></label>
- <label><b title="CSS height string">Height:</b> <input class="short" id="commentEmbedHeight" class="monitor" placeholder="5em"</b>
+ <label><b title="CSS height string">Height:</b> <input id="commentEmbedHeight" class="monitor short" placeholder="5em" /></label>
<div class="metadata">
<div class="notes">
View
4 output/safari/ownyourcomments_0.9.safariextension/options.js
@@ -1,4 +1,4 @@
-function saveURL(evt) {
+function saveOption(evt) {
kango.invokeAsync('kango.storage.setItem', $(evt.target).attr('id'), evt.target.value);
$('#notice').text('Unsaved Changes Made!').toggleClass('unsaved');
@@ -11,7 +11,7 @@ function main() {
$('.monitor').each(function () {
var self = $(this);
- self.keyup(saveURL);
+ self.keyup(saveOption);
kango.invokeAsync('kango.storage.getItem', self.attr('id'), function (url) {
self.val(url);
View
6 src/common/content_script.js
@@ -36,10 +36,12 @@ var OwnYourComments = (function () {
* Embeds an Indieweb comments box before Disqus or Livefyre iframes
*/
function embedCommentsBox() {
- $('iframe[data-disqus-uid]').each(function (i, el) {
+ $('iframe[data-disqus-uid], div#disqus_thread').each(function (i, el) {
var insertID = 'own-your-comments-embed-' + $(el).attr('data-disqus-uid');
- var insertFrame = $('<iframe />').attr('id', insertID);
+ var insertFrame = $('<iframe />')
+ .attr('id', insertID)
+ .css('width', '100%');
var properties = { url: window.location.href };
View
2  src/common/options.html
@@ -53,7 +53,7 @@
<label><b>Disqus/Livefyre Embed URL</b> ⇒ <input id="commentEmbedURL" type="url" class="monitor" placeholder="http://example.org/notes/new?inReplyTo={url}" /></label>
- <label><b title="CSS height string">Height:</b> <input class="short" id="commentEmbedHeight" class="monitor" placeholder="5em" /></label>
+ <label><b title="CSS height string">Height:</b> <input id="commentEmbedHeight" class="monitor short" placeholder="5em" /></label>
<div class="metadata">
<div class="notes">
Please sign in to comment.
Something went wrong with that request. Please try again.