Skip to content

Commit f283999

Browse files
committed
Fix Google analytics.
1 parent 9f3e89f commit f283999

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

manifest.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 2,
33

44
"name": "JWT Debugger",
5-
"description": "The JWT.io debugger as a Chrome extension",
5+
"description": "The JWT.io debugger as a Web Extension",
66
"version": "2.0.0",
77

88
"browser_action": {
@@ -32,6 +32,8 @@
3232
}
3333
},
3434

35+
"content_security_policy": "script-src 'self' https://ssl.google-analytics.com; object-src 'self'",
36+
3537
"permissions": [
3638
"activeTab",
3739
"<all_urls>",

views/extension/layout.pug

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,17 @@ html(lang='en')
77
body
88
block content
99

10+
script.
11+
//Google Analytics
12+
var _gaq = _gaq || [];
13+
_gaq.push(['_setAccount', 'UA-37952868-23']);
14+
_gaq.push(['_trackPageview']);
15+
16+
(function() {
17+
var ga = document.createElement('script');
18+
ga.type = 'text/javascript';
19+
ga.async = true;
20+
ga.src = 'https://ssl.google-analytics.com/ga.js';
21+
var s = document.getElementsByTagName('script')[0];
22+
s.parentNode.insertBefore(ga, s);
23+
})();

0 commit comments

Comments
 (0)