INNER CODE UNIT · JavaScript
percentage
jatinkrmalik/LLMFeeder · extension/background.js:391
const percentage = Math.round((totalTokenCount / limit) * 100);
tokenMessage = `\n${totalTokenCount.toLocaleString()} tokens (${percentage}% of ${(limit/1000).toFixed(0)}K limit)`;
}
// Handle different commands
if (command === "convert_to_markdown") {
// Copy All: Merge and copy to clipboard
const merged = MultiTabUtils.mergeMarkdownResults(results);
const notification = {
title: "Success",
message: `${message} copied to clipboard${tokenMessage}`
};
if (returnResult) {
return {
success: true,
action: "copy",
text: merged,