wip
parent
4a85f99679
commit
99ea8b5225
@ -1 +1,23 @@
|
||||
var hint = require('angular-hint');
|
||||
|
||||
require('./bower_components/angular-loader/angular-loader.js');
|
||||
require('angular-hint');
|
||||
|
||||
// afterThisGetsDefined(window, 'angular', function () {
|
||||
// afterThisGetsDefined(angular, 'module', function () {
|
||||
// require('angular-hint');
|
||||
// });
|
||||
// });
|
||||
|
||||
// function afterThisGetsDefined(obj, prop, fn) {
|
||||
// Object.defineProperty(obj, prop, {
|
||||
// set: function (val) {
|
||||
// Object.defineProperty(obj, prop, {
|
||||
// configurable: true,
|
||||
// writable: true
|
||||
// });
|
||||
// obj[prop] = val;
|
||||
// fn();
|
||||
// },
|
||||
// configurable: true
|
||||
// });
|
||||
// }
|
||||
|
@ -1,13 +1,10 @@
|
||||
|
||||
// inject into the application context from the content script context
|
||||
|
||||
var inject = function () {
|
||||
var script = window.document.createElement('script');
|
||||
script.src = chrome.extension.getURL('hint.bundle.js');
|
||||
document.head.appendChild(script);
|
||||
};
|
||||
|
||||
// only inject if cookie is set
|
||||
if (document.cookie.indexOf('__ngDebug=true') != -1) {
|
||||
document.addEventListener('DOMContentLoaded', inject);
|
||||
}
|
||||
|
||||
var script = window.document.createElement('script');
|
||||
script.src = chrome.extension.getURL('hint.bundle.js');
|
||||
var html = document.getElementsByTagName('html')[0];
|
||||
html.setAttribute('ng-hint', '');
|
||||
|
||||
html.appendChild(script);
|
||||
|
Reference in New Issue