Skip to content
This repository was archived by the owner on Dec 12, 2021. It is now read-only.

Commit 40185fa

Browse files
committed
Improved debugging
1 parent a021449 commit 40185fa

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

lib/snippet-injector.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,24 @@ export default {
5151
if(window.localStorage.getItem('snippet-injector-debug') === 'true') {
5252
if(window.localStorage.getItem('snippet-injector-debug-time') === 'true') {
5353
console.timeEnd("snippet-injector:activate duration");
54+
if(window.localStorage.getItem('snippet-injector-debug-objl') !== 'true')
5455
console.groupEnd();
5556
}
5657

5758
if(window.localStorage.getItem('snippet-injector-debug-objl') === 'true') {
59+
var snippets = new Array();
60+
var _this = this;
61+
_this.storage.retrieveFiles().forEach(function(e) {
62+
snippets.push(JSON.parse(_this.storage.retrieveFile(e.replace('.json',''))));
63+
});
64+
if(window.localStorage.getItem('snippet-injector-debug-time') === 'true') {
65+
console.groupEnd();
66+
}
5867
console.group(_debug.groupTitle.objectLogging);
5968
console.log({
6069
subscriptions: this.subscriptions,
61-
storage: this.storage
70+
storage: this.storage,
71+
_snippets: snippets
6272
});
6373
console.groupEnd();
6474
}

0 commit comments

Comments
 (0)