Permalink
Browse files

Move the injection back into the main script so it happens immediately.

With it in the options callback, there is a race to see if it is
run before pivotal updates the UI the first time.
  • Loading branch information...
1 parent 496a3d3 commit 06403275bfa1769996cedfd2c8c5151f03feedc2 @abierbaum abierbaum committed Mar 11, 2013
Showing with 6 additions and 1 deletion.
  1. +2 −1 extension/src/epic_hook.js
  2. +4 −0 extension/src/pt_tweak_main.js
@@ -2,6 +2,7 @@
PTT.onOptionsLoaded(function(options) {
+
// Only load this tool if the user has not disabled it.
if (! options.epicOverrides) {
console.log('Epic Overrides plugin has been disabled');
@@ -15,7 +16,7 @@ PTT.onOptionsLoaded(function(options) {
// - Add option to split the epic overrides into two
// - OR determine way to pass options into the injected script as arguments
//
- inject_script('epic_overrides.js');
+ //inject_script('epic_overrides.js');
/*
var last_nodes = [],
@@ -15,6 +15,10 @@ function inject_script(scriptFile) {
(document.head||document.documentElement).appendChild(s);
}
+// Code to inject immediately
+// todo: get this loaded as part of configuration
+inject_script('epic_overrides.js');
+
(function(exports) {
function App() {

0 comments on commit 0640327

Please sign in to comment.