Skip to content

Commit

Permalink
fix chrome build
Browse files Browse the repository at this point in the history
  • Loading branch information
koenekelschot committed May 1, 2020
1 parent b49ec38 commit 00c56db
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build
dist
node_modules
2 changes: 1 addition & 1 deletion build/webpack.chrome.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const outDir = '../dist/chrome';
module.exports = {
devtool: 'inline-source-map',
entry: {
content_script: path.join(__dirname, srcDir, 'content_script.ts')
main: path.join(__dirname, srcDir, 'main.ts')
},
output: {
path: path.join(__dirname, outDir),
Expand Down
5 changes: 1 addition & 4 deletions src/chrome/buttonInject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ import { exportMonitor } from "./monitorExport";
export function injectButton(modal: Element): void {
const buttons = modal.getElementsByTagName("button");
for (let i = 0; i < buttons.length; i++) {
// if (buttons[i].innerText != "Copy") {
// continue;
// }
if (buttons[i].textContent != "Copy") { //todo: validate against real Datadog UI
if (buttons[i].textContent != "Copy") {
continue;
}

Expand Down
6 changes: 1 addition & 5 deletions src/chrome/pageObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ function processAddedNodes(nodeList: NodeList): void {
}

const headers = elem.getElementsByTagName("h1");
// console.log(headers[0].innerText);
// if (headers.length < 1 || headers[0].innerText != "Monitor JSON") {
// continue;
// }
if (headers.length < 1 || headers[0].textContent != "Monitor JSON") { //todo: validate against real Datadog UI
if (headers.length < 1 || headers[0].textContent != "Monitor JSON") {
continue;
}

Expand Down

0 comments on commit 00c56db

Please sign in to comment.