/// /// /// /// /// /// module tagIt { angular.module('tagit', ['ngStorage']) .config(AppConfigInitializer) .service('AppConfigService', AppConfigService) .service('BackendService', BackendService) .service('WebPageService', WebPageService) .service('TagStorageService', TagStorageService) .controller('MenuCtrl', MenuCtrl); export function init (callback: () => void) { $.get(chromeUrlTranslator('menu.tpl.html'), function (htmlData) { $('body').children().wrapAll('
'); $('.tagit-body').before(htmlData); window.name = ''; angular.bootstrap(document.getElementById("tagit-menu"), ['tagit']); console.log('TagIt menu loaded'); if(callback) callback(); }); function chromeUrlTranslator(relativeUrl : string) { if(typeof chrome === 'undefined' ) { return relativeUrl; } else { return chrome.extension.getURL(relativeUrl); } } } }