From dfb2c58e3d76cfc0131a1e30cba4ae8d23853726 Mon Sep 17 00:00:00 2001 From: Jez Ng Date: Sun, 19 Aug 2012 23:27:44 -0700 Subject: More refactoring-cleanup. * vimium_frontend now has a pretty decent set of exports * Generic linkHints code has been moved to DomUtils, so future features can reuse the code. --- content_scripts/vimium_frontend.coffee | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'content_scripts/vimium_frontend.coffee') diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 0fc8d518..4de0a695 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -977,20 +977,6 @@ Tween = value = (elapsed / state.duration) * (state.to - state.from) + state.from state.onUpdate(value) -# -# Adds the given CSS to the page. -# -addCssToPage = (css, id) -> - head = document.getElementsByTagName("head")[0] - if (!head) - head = document.createElement("head") - document.documentElement.appendChild(head) - style = document.createElement("style") - style.id = id - style.type = "text/css" - style.appendChild(document.createTextNode(css)) - head.appendChild(style) - initializePreDomReady() window.addEventListener("DOMContentLoaded", initializeOnDomReady) @@ -1000,11 +986,8 @@ window.onbeforeunload = -> scrollX: window.scrollX scrollY: window.scrollY) -# TODO(philc): Export a more tighter, more coherent interface. root = exports ? window -root.window = window root.settings = settings -root.addCssToPage = addCssToPage root.HUD = HUD root.handlerStack = handlerStack root.frameId = frameId -- cgit v1.2.3