diff --git a/src/content_script_include.js b/src/content_script_include.js
index 16b985a..d3a24d5 100644
--- a/src/content_script_include.js
+++ b/src/content_script_include.js
@@ -1,12 +1,12 @@
-// Save a copy of existing angular js and jquery
-// Source: http://www.mattburkedev.com/multiple-angular-versions-on-the-same-page/
-var existingWindowDotAngular = window['angular'];
-// create a new window.angular and a closure variable for
-// angular.js to load itself into
-var angular = (window.angular = {});
-
function injectScripts () {
+ // Save a copy of existing angular js and jquery
+ // Source: http://www.mattburkedev.com/multiple-angular-versions-on-the-same-page/
+ var existingWindowDotAngular = window['angular'];
+ // create a new window.angular and a closure variable for
+ // angular.js to load itself into
+ var angular = (window.angular = {});
+
loadScript('vendor/jquery/dist/jquery.js', loadAngular);
function loadAngular () {
@@ -33,7 +33,7 @@ function injectScripts () {
var s = document.createElement('script');
s.src = scriptName;
s.onload = function() {
- // this.parentNode.removeChild(this);
+ this.parentNode.removeChild(this);
if (callback) callback();
};
(document.head||document.documentElement).appendChild(s);
diff --git a/src/content_script_web.js b/src/content_script_web.js
index d009f53..b8e78f0 100644
--- a/src/content_script_web.js
+++ b/src/content_script_web.js
@@ -4,6 +4,13 @@
injectScripts(); //found in the included file
+document.addEventListener("DOMContentLoaded", function(event) {
+ document.getElementById('js-show-menu')
+ .addEventListener('click', function () {
+ if (!document.getElementById('tagit-menu')) injectScripts();
+ });
+});
+
// will be called within a angular service
function storeTagData (tagData) {
console.log('storeTagDataInBrowser was called');
diff --git a/src/index.html b/src/index.html
index fdbe58e..d9b4781 100644
--- a/src/index.html
+++ b/src/index.html
@@ -16,9 +16,15 @@
-
+
+