(url)
| 69 | |
| 70 | // Function to remove a mention from the list |
| 71 | async function removeFromMentionList(url) { |
| 72 | try { |
| 73 | const data = loadMentionData(); |
| 74 | |
| 75 | // Check if the URL exists |
| 76 | if (data[url]) { |
| 77 | delete data[url]; // Remove the mention |
| 78 | saveMentionData(data); |
| 79 | console.log(`URL ${url} has been removed from the mention list.`); |
| 80 | } else { |
| 81 | console.log(`URL ${url} is not in the mention list.`); |
| 82 | } |
| 83 | } catch (error) { |
| 84 | console.error("Error while removing the mention from the list:", error); |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | // Exporting the functions for external use |
| 89 | module.exports = { |
nothing calls this directly
no test coverage detected