commit 2516e9fa34463b43a5cb3b11c43849ad807aceb5 Author: David Fifield david@bamsoftware.com Date: Sun Jun 23 18:45:27 2013 -0700
Factor out flashproxy_badge_new from flashproxy_badge_insert.
It makes a badge but doesn't insert it in the DOM. --- proxy/flashproxy.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/proxy/flashproxy.js b/proxy/flashproxy.js index cd80c6d..3265a11 100644 --- a/proxy/flashproxy.js +++ b/proxy/flashproxy.js @@ -1072,14 +1072,22 @@ function flashproxy_should_disable() { return false; }
-function flashproxy_badge_insert() { +function flashproxy_badge_new() { var fp; - var e;
fp = new FlashProxy(); if (flashproxy_should_disable()) fp.disable();
+ return fp; +} + +function flashproxy_badge_insert() { + var fp; + var e; + + fp = flashproxy_badge_new(); + /* http://intertwingly.net/blog/2006/11/10/Thats-Not-Write for this trick to insert right after the <script> element in the DOM. */ e = document.body;