Committer: vvasin
LJSUP-14313: Move debug stuff into the LJ.debug namespace (from Site.debug).U trunk/htdocs/js/livejournal.js
Modified: trunk/htdocs/js/livejournal.js =================================================================== --- trunk/htdocs/js/livejournal.js 2012-11-21 09:41:17 UTC (rev 23339) +++ trunk/htdocs/js/livejournal.js 2012-11-21 10:34:11 UTC (rev 23340) @@ -874,43 +874,3 @@ } return null; }; - -LiveJournal.showWidgets = function() { - - function random() { - return 'rgb(' + (Math.floor((256-199)*Math.random()) + 200) + ',' - + (Math.floor((256-199)*Math.random()) + 200) + ',' - + (Math.floor((256-199)*Math.random()) + 200) + ')'; - } - - function _click(widget) { - widget.element - .click(function() { - console.log(widget.__proto__.widgetName, widget); - }); - } - - function _color(widget) { - widget.element - .css('background-color', random()) - .css('border', '3px dashed ' + random()); - } - - for (var widget in jQuery.lj) { - var instances = jQuery.lj[widget].prototype.instances; - if (instances) { - instances.forEach(_click); - } - } - setInterval(function() { - for (var widget in jQuery.lj) { - var instances = jQuery.lj[widget].prototype.instances; - if (instances) { - instances.forEach(_color); - } - } - }, 500); - -}; - -LiveJournal.widgetEvents = {};