Skip to content

Commit e15b71e

Browse files
authored
Merge pull request #52 from LasCC/dev_riadh
fixing compatibility issue devtool panel
2 parents 0a0a3cd + 49268a8 commit e15b71e

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

src/devtools/devtools.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
chrome.devtools.panels.create(
2-
"HackTools", // title for the panel tab
3-
null, // you can specify here path to an icon
4-
"index.html", // html page which is gonna be injecting into the tab's content
5-
null // you can pass here a callback function
6-
);
1+
navigator.userAgent.indexOf("Firefox") != -1 &&
2+
browser.devtools.panels.create(
3+
"HackTools",
4+
"get_started16.png",
5+
"index.html"
6+
);
7+
8+
navigator.userAgent.indexOf("Chrome") != -1 &&
9+
chrome.devtools.panels.create(
10+
"HackTools", // title for the panel tab
11+
null, // path to an icon
12+
"index.html", // html page which is gonna be injecting into the tab's content
13+
null // callback function here
14+
);

0 commit comments

Comments
 (0)