Permalink
Browse files

templates/widget-{pod,power}press: avoid running twice

users provoke that :-/
  • Loading branch information...
1 parent 66ec3f7 commit 04ed1c6f01d3ec0d9f273f0293aa5f7abd5978f3 @astro committed Aug 28, 2012
Showing with 12 additions and 0 deletions.
  1. +6 −0 templates/widget-podpress.js
  2. +6 −0 templates/widget-powerpress.js
@@ -1,5 +1,11 @@
+window.bitlovePodpress = false;
+
var $ = jQuery;
$(document).ready(function() {
+ if (window.bitlovePodpress)
+ return;
+ window.bitlovePodpress = true;
+
/* For Podpress */
$('.podPress_downloadlinks').each(function() {
var orig = $(this);
@@ -1,4 +1,10 @@
+window.bitlovePowerpress = false;
+
document.addEventListener('DOMContentLoaded', function(){
+ if (window.bitlovePowerpress)
+ return;
+ window.bitlovePowerpress = true;
+
var i, ps = document.getElementsByClassName('powerpress_links');
for(i = 0; i < ps.length; i++) {
var p = ps[i];

0 comments on commit 04ed1c6

Please sign in to comment.