Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
reconman committed May 20, 2020
1 parent 0969743 commit 6111f30
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions src/twitch_background.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { MatchRecord, Updater, Character } from "./records";
import { Chromosome } from "./strategy";
import { openDB } from 'idb';
async function getMatchRecords() {
const db = await openDB("saltbot", 1);
Expand Down Expand Up @@ -209,31 +208,4 @@ chrome.runtime.onMessage.addListener(function (details, sender, sendResponse) {
sendResponse(null);
}
return false;
});
function sendUpdatedChromosome() {
chrome.storage.local.get(["chromosomes_v1"], function (results: { chromosomes_v1: Chromosome[] }) {
if (results.chromosomes_v1) {
results.chromosomes_v1.forEach((chromosome: Chromosome) => {
if (!chromosome.rank) {
chromosome.rank = 100;
}
});

results.chromosomes_v1.sort(function (a, b) {
return a.rank - b.rank;
});
const data = JSON.stringify(results.chromosomes_v1[0]);
chrome.tabs.query({
title: "Salty Bet",
url: "*://*.saltybet.com/",
}, function (result) {
if (result.length > 0) {
chrome.tabs.sendMessage(result[0].id, {
text: data,
type: "suc",
});
}
});
}
});
}
});

0 comments on commit 6111f30

Please sign in to comment.