test-unit-sauce
Brian Ford 10 years ago
parent 4a85f99679
commit 99ea8b5225

@ -3,7 +3,8 @@
"version": "0.5.0", "version": "0.5.0",
"dependencies": { "dependencies": {
"angular": "~1.2.20", "angular": "~1.2.20",
"d3": "~3.2.6" "d3": "~3.2.6",
"angular-loader": "~1.2.20"
}, },
"devDependencies": { "devDependencies": {
"angular-mocks": "~1.2.20" "angular-mocks": "~1.2.20"

@ -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 // inject into the application context from the content script context
var inject = function () {
var script = window.document.createElement('script'); var script = window.document.createElement('script');
script.src = chrome.extension.getURL('hint.bundle.js'); script.src = chrome.extension.getURL('hint.bundle.js');
document.head.appendChild(script); var html = document.getElementsByTagName('html')[0];
}; html.setAttribute('ng-hint', '');
// only inject if cookie is set html.appendChild(script);
if (document.cookie.indexOf('__ngDebug=true') != -1) {
document.addEventListener('DOMContentLoaded', inject);
}

@ -15,5 +15,8 @@
"run_at": "document_start" "run_at": "document_start"
} }
], ],
"web_accessible_resources": [
"hint.bundle.js"
],
"minimum_chrome_version": "21.0.1180.57" "minimum_chrome_version": "21.0.1180.57"
} }