Answer:
Smug
Step-by-step explanation:
In this passage, the author offers a personification of the gadget he is employing. He tells us that this gadget is "gloating." If we did not know what gloating meant, we could still try to figure out the meaning of the word by looking at the context of the passage. We see that the gadget also looked "smug." This characteristic could provide a clue as to the meaning of the word "gloating," as the two convey similar ideas.